1
0
mirror of https://github.com/solemnwarning/ipxwrapper synced 2024-12-30 16:45:37 +01:00

Updated shutdown to work with SPX sockets.

This commit is contained in:
Daniel Collins 2014-01-11 22:59:58 +00:00
parent 94d3a6cbbd
commit ae2837258f

View File

@ -1107,18 +1107,25 @@ int PASCAL shutdown(SOCKET fd, int cmd)
if(sock)
{
if(cmd == SD_RECEIVE || cmd == SD_BOTH)
if(sock->flags & IPX_IS_SPX)
{
sock->flags &= ~IPX_RECV;
unlock_sockets();
return r_shutdown(fd, cmd);
}
if(cmd == SD_SEND || cmd == SD_BOTH)
{
sock->flags &= ~IPX_SEND;
else{
if(cmd == SD_RECEIVE || cmd == SD_BOTH)
{
sock->flags &= ~IPX_RECV;
}
if(cmd == SD_SEND || cmd == SD_BOTH)
{
sock->flags &= ~IPX_SEND;
}
unlock_sockets();
return 0;
}
unlock_sockets();
return 0;
}
else{
return r_shutdown(fd, cmd);