aboutsummaryrefslogtreecommitdiff
path: root/src/network.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/network.cpp')
-rw-r--r--src/network.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/network.cpp b/src/network.cpp
index d2d9615..58b3ce1 100644
--- a/src/network.cpp
+++ b/src/network.cpp
@@ -1,3 +1,4 @@
+#include "salticidae/config.h"
#ifdef SALTICIDAE_CBINDINGS
#include "salticidae/network.h"
@@ -56,13 +57,19 @@ msgnetwork_t *msgnetwork_conn_get_net(const msgnetwork_conn_t *conn) {
void msgnetwork_start(msgnetwork_t *self) { self->start(); }
msgnetwork_conn_mode_t msgnetwork_conn_get_mode(const msgnetwork_conn_t *conn) {
- return conn->get_mode();
+ return (msgnetwork_conn_mode_t)(*conn)->get_mode();
}
-netaddr_t msgnetwork_conn_get_addr(const msgnetwork_conn_t *conn) {
- return new netaddr_t(conn->get_addr());
+netaddr_t *msgnetwork_conn_get_addr(const msgnetwork_conn_t *conn) {
+ return new netaddr_t((*conn)->get_addr());
}
+msgnetwork_config_t *msgnetwork_config_new() {
+ return new msgnetwork_config_t();
+}
+
+void msgnetwork_config_free(msgnetwork_config_t *self) { delete self; }
+
}
#endif