summaryrefslogtreecommitdiff
path: root/lib/send.c
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordu.net>2011-03-08 13:20:20 +0100
committerLinus Nordberg <linus@nordu.net>2011-03-08 13:20:20 +0100
commit1073de4a6139cf1b78ed82bc93e26be385cb76b1 (patch)
treeec5cc24f697a820a8eb2a51702c940ff64f27a9e /lib/send.c
parent962869fcd2decd993171aa82c00b9e0b3517f995 (diff)
Don't return -1 to user but rather an error code.
NOTE: Changes rs_conn_receive_packet() and rs_packet_send() only.
Diffstat (limited to 'lib/send.c')
-rw-r--r--lib/send.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/send.c b/lib/send.c
index cc7fd71..af25144 100644
--- a/lib/send.c
+++ b/lib/send.c
@@ -128,7 +128,10 @@ rs_packet_send (struct rs_packet *pkt, void *user_data)
conn->user_data = NULL;
if ((pkt->flags & rs_packet_sent_flag) == 0)
- return -1;
+ {
+ assert (rs_err_conn_peek_code (conn));
+ return rs_err_conn_peek_code (conn);
+ }
}
return RSE_OK;