diff options
author | Linus Nordberg <linus@nordu.net> | 2010-09-29 21:53:43 +0200 |
---|---|---|
committer | Linus Nordberg <linus@nordu.net> | 2010-09-29 21:53:43 +0200 |
commit | 727af5678906c03eedff8d8262d39fad788973a6 (patch) | |
tree | f9192ecc6b6590d79c356106004f14f2f46b7c2d /lib/examples | |
parent | de906e3721e19d9d8b2c61f834d8057bcce47af1 (diff) |
Refactoring in preparation for handling more cases than client sending one packet.
Diffstat (limited to 'lib/examples')
-rw-r--r-- | lib/examples/client.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/lib/examples/client.c b/lib/examples/client.c index 14555c7..d7e7270 100644 --- a/lib/examples/client.c +++ b/lib/examples/client.c @@ -38,9 +38,17 @@ rsx_client (const char *srvname, int srvport) return rs_conn_err_pop (conn); req = NULL; +#if 0 + if (rs_packet_recv (conn, &resp)) + return rs_conn_err_pop (conn); +#if defined (DEBUG) + rs_dump_packet (resp); +#endif +#endif + rs_conn_destroy (conn); rs_context_destroy (h); - return 0; + return NULL; } int @@ -53,8 +61,10 @@ main (int argc, char *argv[]) host = strsep (argv + 1, ":"); port = atoi (argv[1]); err = rsx_client (host, port); - if (!err) - return -1; - fprintf (stderr, "%s\n", rs_err_msg (err, 0)); - return rs_err_code (err, 1); + if (err) + { + fprintf (stderr, "%s\n", rs_err_msg (err, 0)); + return rs_err_code (err, 1); + } + return 0; } |