From: hackbard Date: Sun, 9 May 2004 10:26:41 +0000 (+0000) Subject: bugfixed !( stuff X-Git-Url: https://hackdaworld.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5cefb7a043dc08801cb98524f129b8fc4df6ed6c;p=my-code%2Fivac.git bugfixed !( stuff --- 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) {