summaryrefslogtreecommitdiff
path: root/lib/examples/client-blocking.c
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordberg.se>2011-02-25 13:05:46 +0100
committerLinus Nordberg <linus@nordberg.se>2011-02-25 13:05:46 +0100
commitce87482616de6f5078bd9b6c685f9ec62c220b3d (patch)
treeba1d628a55b99fe60ef6270cecaea9dab961f1e1 /lib/examples/client-blocking.c
parent53d44d49597a515ae6c22ec20138a21986f6c3ab (diff)
API change. Have the request object create its own request message.
Diffstat (limited to 'lib/examples/client-blocking.c')
-rw-r--r--lib/examples/client-blocking.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/examples/client-blocking.c b/lib/examples/client-blocking.c
index def0068..a7fc03d 100644
--- a/lib/examples/client-blocking.c
+++ b/lib/examples/client-blocking.c
@@ -46,21 +46,21 @@ blocking_client (const char *av1, const char *av2, int use_request_object_flag)
return rs_err_conn_pop (conn);
#endif /* USE_CONFIG_FILE */
- if (rs_packet_create_auth_request (conn, &req, USER_NAME, USER_PW))
- return rs_err_conn_pop (conn);
-
if (use_request_object_flag)
{
struct rs_request *request;
- if (rs_request_create (conn, &request))
+ if (rs_request_create (conn, &request, USER_NAME, USER_PW))
return rs_err_conn_pop (conn);
- if (rs_request_send (request, req, &resp))
+ if (rs_request_send (request, &resp))
return rs_err_conn_pop (conn);
rs_request_destroy (request);
}
else
{
+ if (rs_packet_create_auth_request (conn, &req, USER_NAME, USER_PW))
+ return rs_err_conn_pop (conn);
+
if (rs_packet_send (req, NULL))
{
rs_packet_destroy (req);