From 5cefb7a043dc08801cb98524f129b8fc4df6ed6c Mon Sep 17 00:00:00 2001 From: hackbard Date: Sun, 9 May 2004 10:26:41 +0000 Subject: [PATCH] bugfixed !( stuff --- src/network.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/network.c b/src/network.c index 9ccb2b5..66314f9 100644 --- a/src/network.c +++ b/src/network.c @@ -96,7 +96,7 @@ int network_manage_connection(t_net *net) { if(net->connection[i].status&C_INFO_A) { - if(!net->connection[i].status&C_SOCKET) { + if(!(net->connection[i].status&C_SOCKET)) { if((net->connection[i].fd=socket(AF_INET,SOCK_STREAM,0))==-1) { perror("[network] socket call"); return N_ERROR; @@ -104,7 +104,7 @@ int network_manage_connection(t_net *net) { net->connection[i].status|=C_SOCKET; } - if((!net->connection[i].status&C_ESTABL)&& + if((!(net->connection[i].status&C_ESTABL))&& (net->connection[i].status&C_SOCKET)) { memset(&addr,0,sizeof(struct sockaddr)); @@ -143,7 +143,7 @@ int network_manage_incoming(t_net *net) { int len; for(channel=0;channelconnection[channel].status&C_IN_USE) { + if(!(net->connection[channel].status&C_IN_USE)) { if((net->connection[channel].fd=accept(net->l_fd, (struct sockaddr *)&addr, &len))==-1) { -- 2.39.2