mirror of
https://github.com/solemnwarning/ipxwrapper
synced 2024-12-30 16:45:37 +01:00
Changed debug messages in socket/closesocket.
This commit is contained in:
parent
9aba673989
commit
81c54ce285
@ -152,7 +152,7 @@ SOCKET WSAAPI socket(int af, int type, int protocol) {
|
|||||||
nsock->next = sockets;
|
nsock->next = sockets;
|
||||||
sockets = nsock;
|
sockets = nsock;
|
||||||
|
|
||||||
debug("Socket created (fd=%d)", nsock->fd);
|
debug("IPX socket created (fd = %d)", nsock->fd);
|
||||||
|
|
||||||
RETURN(nsock->fd);
|
RETURN(nsock->fd);
|
||||||
}else{
|
}else{
|
||||||
@ -161,17 +161,22 @@ SOCKET WSAAPI socket(int af, int type, int protocol) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int WSAAPI closesocket(SOCKET fd) {
|
int WSAAPI closesocket(SOCKET fd) {
|
||||||
debug("closesocket(%d)", fd);
|
int ret = r_closesocket(fd);
|
||||||
|
|
||||||
if(r_closesocket(fd) == SOCKET_ERROR) {
|
|
||||||
debug("...failed");
|
|
||||||
RETURN(SOCKET_ERROR);
|
|
||||||
}
|
|
||||||
|
|
||||||
ipx_socket *ptr = get_socket(fd);
|
ipx_socket *ptr = get_socket(fd);
|
||||||
ipx_socket *pptr = sockets;
|
ipx_socket *pptr = sockets;
|
||||||
|
|
||||||
debug("...success");
|
if(!ptr) {
|
||||||
|
/* Not an IPX socket */
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(ret == SOCKET_ERROR) {
|
||||||
|
debug("closesocket(%d) failed: %s", fd, w32_error(WSAGetLastError()));
|
||||||
|
RETURN(SOCKET_ERROR);
|
||||||
|
}
|
||||||
|
|
||||||
|
debug("IPX socket closed (fd = %d)", fd);
|
||||||
|
|
||||||
if(ptr == sockets) {
|
if(ptr == sockets) {
|
||||||
sockets = ptr->next;
|
sockets = ptr->next;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user