[pisa-src] r1382 - in trunk: include/socket.h libpisa/socket.c

  • From: Thomas Jansen <mithi@xxxxxxxxx>
  • To: pisa-src@xxxxxxxxxxxxx
  • Date: Wed, 28 Oct 2009 14:54:56 +0100

Author: tjansen
Date: Wed Oct 28 14:54:56 2009
New Revision: 1382

Log:
Removed unused function setup_sock_udp.

Modified:
   trunk/include/socket.h
   trunk/libpisa/socket.c

Modified: trunk/include/socket.h
==============================================================================
--- trunk/include/socket.h      Wed Oct 28 14:47:28 2009        (r1381)
+++ trunk/include/socket.h      Wed Oct 28 14:54:56 2009        (r1382)
@@ -22,6 +22,5 @@
 #include "global.h"
 
 int setup_listen_sock_udp(int domain, int portnumber);
-int setup_sock_udp(int domain);
 
 #endif /* PISA_SOCKET_H */

Modified: trunk/libpisa/socket.c
==============================================================================
--- trunk/libpisa/socket.c      Wed Oct 28 14:47:28 2009        (r1381)
+++ trunk/libpisa/socket.c      Wed Oct 28 14:54:56 2009        (r1382)
@@ -65,26 +65,3 @@
 
        return fd_listen;
 }
-
-/**
- * Setup a UDP socket for either IPv4 or IPv6, just used by server
- * Make a UDP socket for listening, bind it with IPv4 address.
- *
- * @param domain AF_INET for IPv4 or AF_INET6 for IPv6
- * @return the fd number
- */
-int setup_sock_udp(int domain)
-{
-       int fd_local = -1;
-       int sockopt = 1;
-
-       fd_local = socket(domain, SOCK_DGRAM, 0);
-       if (fd_local < 0) {
-               PISA_DEBUG("failed to create socket.\n");
-               return fd_local;
-       }
-
-       setsockopt(fd_local, SOL_SOCKET, SO_REUSEADDR, &sockopt, 
sizeof(sockopt));
-
-       return fd_local;
-}

Other related posts:

  • » [pisa-src] r1382 - in trunk: include/socket.h libpisa/socket.c - Thomas Jansen