diff options
author | Luke Howard <lukeh@padl.com> | 2010-10-09 11:54:37 +0200 |
---|---|---|
committer | Linus Nordberg <linus@nordu.net> | 2010-10-11 18:50:25 +0200 |
commit | 06936d1f263c456017e20ea6c74d2756e1e30fcc (patch) | |
tree | 25616bd4f0bc515b47d9e8c3b712c21627c05144 /lib/examples | |
parent | ff55882798b6c482faec920d30a4ffdc10b306f7 (diff) |
Have rad_decode() verify responses.
Diffstat (limited to 'lib/examples')
-rw-r--r-- | lib/examples/client-blocking.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/examples/client-blocking.c b/lib/examples/client-blocking.c index 66f4859..365b3b0 100644 --- a/lib/examples/client-blocking.c +++ b/lib/examples/client-blocking.c @@ -55,10 +55,16 @@ blocking_client (const char *av1, const char *av2) #if !defined(USE_REQUEST_OBJECT) if (rs_packet_send (req, NULL)) - return rs_err_conn_pop (conn); - req = NULL; - if (rs_conn_receive_packet (conn, &resp)) - return rs_err_conn_pop (conn); + { + rs_packet_destroy (req); + return rs_err_conn_pop (conn); + } + if (rs_conn_receive_packet (conn, req, &resp)) + { + rs_packet_destroy (req); + return rs_err_conn_pop (conn); + } + rs_packet_destroy (req); #else { struct rs_request *request; |