diff options
author | linus <linus@nordu.net> | 2011-01-21 16:32:28 +0100 |
---|---|---|
committer | linus <linus@nordu.net> | 2011-01-21 16:32:28 +0100 |
commit | f58ce3d98a13e9c8d0930b54c5f593cbfa196d65 (patch) | |
tree | f20db3c05fa49c3b9ddad748b8a0b9dc6c79404f /lib/tests/udp-server.c | |
parent | 7b928a0509a668b99679a1bbedd189575fe71559 (diff) |
Some more UDP tests.
Diffstat (limited to 'lib/tests/udp-server.c')
-rw-r--r-- | lib/tests/udp-server.c | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/lib/tests/udp-server.c b/lib/tests/udp-server.c index 768fba0..ce0136a 100644 --- a/lib/tests/udp-server.c +++ b/lib/tests/udp-server.c @@ -5,17 +5,7 @@ ssize_t handle_data (const uint8_t *buf, ssize_t len) { - int i; - - printf ("# len: %ld\n", len); - for (i = 0; i < len; i++) - { - printf ("%02x%s", buf[i], (i+1) % 8 ? " " : " "); - if ((i + 1) % 16 == 0) - printf ("\n"); - } - printf ("\n"); - return len; + return hd (buf, len); } int @@ -37,11 +27,6 @@ main (int argc, char *argv[]) tv.tv_sec, tv.tv_sec > 1 ? "s" : ""); } - if (data) - { - if (data->timeout) - free (data->timeout); - free (data); - } + udp_free_polldata (data); return (n <= 0); } |