From 5d1a02eb41025020b8c25ab927baca978fb733a9 Mon Sep 17 00:00:00 2001 From: Linus Nordberg Date: Sun, 10 Oct 2010 11:47:43 +0200 Subject: Rename rs_req_* --> rs_request_. Contributed by Luke Howard. --- lib/examples/client-blocking.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/examples/client-blocking.c') diff --git a/lib/examples/client-blocking.c b/lib/examples/client-blocking.c index bb9e653..66f4859 100644 --- a/lib/examples/client-blocking.c +++ b/lib/examples/client-blocking.c @@ -63,9 +63,9 @@ blocking_client (const char *av1, const char *av2) { struct rs_request *request; - if (rs_request_new (conn, &request)) + if (rs_request_create (conn, &request)) return rs_err_conn_pop (conn); - if (rs_req_send (request, req, &resp)) + if (rs_request_send (request, req, &resp)) return rs_err_conn_pop (conn); rs_request_destroy (request); } -- cgit v1.1 From 06936d1f263c456017e20ea6c74d2756e1e30fcc Mon Sep 17 00:00:00 2001 From: Luke Howard Date: Sat, 9 Oct 2010 11:54:37 +0200 Subject: Have rad_decode() verify responses. --- lib/examples/client-blocking.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'lib/examples/client-blocking.c') 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; -- cgit v1.1