diff options
author | VMware, Inc <> | 2013-09-17 20:43:03 -0700 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2013-09-22 22:30:01 -0700 |
commit | 76713ae5c4d5f7a4616d3005137c276535d654fa (patch) | |
tree | 917d78cc19a63ef3fe9712dbe994219d16c92122 | |
parent | adead816acb768fb9c4a91942c93f464894902f9 (diff) |
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 <dtor@vmware.com>
-rw-r--r-- | open-vm-tools/lib/asyncsocket/asyncsocket.c | 44 | ||||
-rw-r--r-- | open-vm-tools/lib/include/asyncsocket.h | 5 |
2 files changed, 0 insertions, 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 @@ -679,50 +679,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; -} - -/* - *---------------------------------------------------------------------------- - * * AsyncSocketInit -- * * This is an internal routine that sets up a socket. 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 */ |