projects
/
radsecproxy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
962869f
)
Don't return -1 to user but rather an error code.
author
Linus Nordberg
<linus@nordu.net>
Tue, 8 Mar 2011 12:20:20 +0000
(13:20 +0100)
committer
Linus Nordberg
<linus@nordu.net>
Tue, 8 Mar 2011 12:20:20 +0000
(13:20 +0100)
NOTE: Changes rs_conn_receive_packet() and rs_packet_send() only.
lib/conn.c
patch
|
blob
|
history
lib/send.c
patch
|
blob
|
history
diff --git
a/lib/conn.c
b/lib/conn.c
index
028302c
..
feed856
100644
(file)
--- a/
lib/conn.c
+++ b/
lib/conn.c
@@
-305,7
+305,7
@@
rs_conn_receive_packet (struct rs_connection *conn,
&& packet_verify_response (pkt->conn, pkt, req_msg) != RSE_OK))
{
assert (rs_err_conn_peek_code (pkt->conn));
- return
-1
;
+ return
rs_err_conn_peek_code (conn)
;
}
if (pkt_out)
diff --git
a/lib/send.c
b/lib/send.c
index
cc7fd71
..
af25144
100644
(file)
--- 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;