aboutsummaryrefslogtreecommitdiff
path: root/src/network.cpp
diff options
context:
space:
mode:
authorDeterminant <[email protected]>2019-06-12 19:14:40 -0400
committerDeterminant <[email protected]>2019-06-12 19:14:40 -0400
commite27e529e589ef89fbe010ebf7c5635ec2873f64f (patch)
tree76e7d20589d11f3aabd255ca70201f1288d1d1bc /src/network.cpp
parent9f6460c7ab774d900f391345bbf3fac8617a3aa3 (diff)
WIP: error handling
Diffstat (limited to 'src/network.cpp')
-rw-r--r--src/network.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/network.cpp b/src/network.cpp
index 49bad48..30ef0eb 100644
--- a/src/network.cpp
+++ b/src/network.cpp
@@ -44,9 +44,10 @@ void msgnetwork_config_queue_capacity(msgnetwork_config_t *self, size_t cap) {
self->queue_capacity(cap);
}
-bool msgnetwork_send_msg(msgnetwork_t *self,
- const msg_t *msg, const msgnetwork_conn_t *conn) {
- return self->_send_msg(*msg, *conn);
+void msgnetwork_send_msg_by_move(msgnetwork_t *self,
+ msg_t *_moved_msg, const msgnetwork_conn_t *conn) {
+ self->_send_msg(std::move(*_moved_msg), *conn);
+ delete _moved_msg;
}
msgnetwork_conn_t *msgnetwork_connect(msgnetwork_t *self, const netaddr_t *addr) {
@@ -167,7 +168,7 @@ void peernetwork_send_msg_by_move(peernetwork_t *self,
void peernetwork_multicast_msg_by_move(peernetwork_t *self,
msg_t *_moved_msg,
const netaddr_array_t *paddrs) {
- self->multicast_msg(std::move(*_moved_msg), *paddrs);
+ self->_multicast_msg(std::move(*_moved_msg), *paddrs);
delete _moved_msg;
}