Rename external functions in UDP test files.
authorlinus <linus@nordu.net>
Thu, 20 Jan 2011 09:02:52 +0000 (10:02 +0100)
committerlinus <linus@nordu.net>
Thu, 20 Jan 2011 09:02:52 +0000 (10:02 +0100)
lib/tests/udp-server.c
lib/tests/udp.c
lib/tests/udp.h

index 9275e10..768fba0 100644 (file)
@@ -29,9 +29,9 @@ main (int argc, char *argv[])
 
   tv.tv_sec = TIMEOUT;
   tv.tv_usec = 0;
-  data = server (argv[1], &tv, handle_data);
+  data = udp_server (argv[1], &tv, handle_data);
 
-  for (i = 0, n = poll (data); n == 0 && i < 3; n = poll (data), i++)
+  for (i = 0, n = udp_poll (data); n == 0 && i < 3; n = udp_poll (data), i++)
     {
       fprintf (stderr, "waiting another %ld second%s\n",
               tv.tv_sec, tv.tv_sec > 1 ? "s" : "");
index 6c43a2f..184325e 100644 (file)
@@ -41,7 +41,7 @@ _resolve (const char *str)
 }
 
 ssize_t
-poll (struct polldata *data)
+udp_poll (struct polldata *data)
 {
   int r;
   long timeout;
@@ -68,7 +68,7 @@ poll (struct polldata *data)
 }
 
 struct polldata *
-server (const char *bindto, struct timeval *timeout, data_cb cb)
+udp_server (const char *bindto, struct timeval *timeout, data_cb cb)
 {
   struct addrinfo *res;
   int s = -1;
index 402295f..02e1b50 100644 (file)
@@ -1,7 +1,6 @@
 #include <stdint.h>
 #include <unistd.h>
 #include <sys/time.h>
-//#include <sys/types.h>
 
 typedef ssize_t (*data_cb) (const uint8_t *buf, ssize_t len);
 struct polldata {
@@ -10,5 +9,5 @@ struct polldata {
   struct timeval *timeout;
 };
 
-struct polldata *server (const char *bindto, struct timeval *timeout, data_cb cb);
-ssize_t poll (struct polldata *data);
+struct polldata *udp_server (const char *bindto, struct timeval *timeout, data_cb cb);
+ssize_t udp_poll (struct polldata *data);