summaryrefslogtreecommitdiff
path: root/lib/tests/udp-server.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tests/udp-server.c')
-rw-r--r--lib/tests/udp-server.c19
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);
}