aboutsummaryrefslogtreecommitdiff
path: root/src/network.cpp
diff options
context:
space:
mode:
authorDeterminant <[email protected]>2019-06-04 22:17:17 -0400
committerDeterminant <[email protected]>2019-06-04 22:17:17 -0400
commitdab48a1825aed9c810ce83ea8054fa435ecb41be (patch)
treee0a3f9587e3606350dedb291a22a70a9ba5b7e44 /src/network.cpp
parentda42ddf96c78a73b4cf5f8854e98e009f4f174a4 (diff)
...
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