From 76713ae5c4d5f7a4616d3005137c276535d654fa Mon Sep 17 00:00:00 2001 From: "VMware, Inc" <> Date: Tue, 17 Sep 2013 20:43:03 -0700 Subject: AsyncSocket: Removed unused AsyncSocket_BindUDP. 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 --- open-vm-tools/lib/asyncsocket/asyncsocket.c | 44 ----------------------------- open-vm-tools/lib/include/asyncsocket.h | 5 ---- 2 files changed, 49 deletions(-) diff --git a/open-vm-tools/lib/asyncsocket/asyncsocket.c b/open-vm-tools/lib/asyncsocket/asyncsocket.c index 6eedc4ed..c97b6d74 100644 --- a/open-vm-tools/lib/asyncsocket/asyncsocket.c +++ b/open-vm-tools/lib/asyncsocket/asyncsocket.c @@ -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; -} - /* *---------------------------------------------------------------------------- * diff --git a/open-vm-tools/lib/include/asyncsocket.h b/open-vm-tools/lib/include/asyncsocket.h index b352eac9..5abcc830 100644 --- a/open-vm-tools/lib/include/asyncsocket.h +++ b/open-vm-tools/lib/include/asyncsocket.h @@ -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 */ -- cgit v1.2.3