]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
AsyncSocket: Removed unused AsyncSocket_BindUDP.
authorVMware, Inc <>
Wed, 18 Sep 2013 03:43:03 +0000 (20:43 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Mon, 23 Sep 2013 05:30:01 +0000 (22:30 -0700)
AsyncSocket_BindUDP is unused, and looking at it I am not sure if it ever worked
as described, since it did not actually bind to the port specified, just a UDP
listener.

Signed-off-by: Dmitry Torokhov <dtor@vmware.com>
open-vm-tools/lib/asyncsocket/asyncsocket.c
open-vm-tools/lib/include/asyncsocket.h

index 6eedc4ed5d868efa33bae5abefdfc2bf6a6734ca..c97b6d74314f4762bcfa01f66c029410b3fc1f42 100644 (file)
@@ -676,50 +676,6 @@ AsyncSocket_ListenVMCI(unsigned int cid,                  // IN
 }
 
 
-/*
- *----------------------------------------------------------------------------
- *
- * AsyncSocket_BindUDP --
- *
- *      Listens on the specified port and accepts new UDP connections.
- *
- * Results:
- *      New AsyncSocket in listening state or NULL on error.
- *
- * Side effects:
- *      Creates new socket, binds.
- *
- *----------------------------------------------------------------------------
- */
-
-AsyncSocket *
-AsyncSocket_BindUDP(unsigned short port,
-                    void *clientData,
-                    AsyncSocketPollParams *pollParams,
-                    int *outError)
-{
-   AsyncSocket *asock = AsyncSocketInit(AF_INET, SOCK_DGRAM, pollParams,
-                                        outError);
-
-   if (NULL != asock) {
-      struct sockaddr_in addr;
-
-      addr.sin_family = AF_INET;
-      addr.sin_addr.s_addr = htonl(INADDR_ANY);
-      addr.sin_port = htons(0);
-
-      if (AsyncSocketBind(asock, (struct sockaddr *)&addr, outError)) {
-         asock->connectFn = NULL;
-         asock->clientData = clientData;
-         asock->state = AsyncSocketConnected;
-
-         return asock;
-      }
-   }
-
-   return NULL;
-}
-
 /*
  *----------------------------------------------------------------------------
  *
index b352eac9b7b18a376d89d4d4210fd87e66f5f90c..5abcc83052ef79d75027d03a025f3974dcffdb8a 100644 (file)
@@ -231,11 +231,6 @@ AsyncSocket *AsyncSocket_ListenWebSocketIP(const int32 ipAddr,
                                            AsyncSocketPollParams *pollParams,
                                            int *outError);
 
-AsyncSocket *AsyncSocket_BindUDP(unsigned short port,
-                                 void *clientData,
-                                 AsyncSocketPollParams *pollParams,
-                                 int *error);
-
 /*
  * Connect to address:port and fire callback with new asock
  */