]> hackdaworld.org Git - my-code/ivac.git/commitdiff
bugfixed !( stuff
authorhackbard <hackbard>
Sun, 9 May 2004 10:26:41 +0000 (10:26 +0000)
committerhackbard <hackbard>
Sun, 9 May 2004 10:26:41 +0000 (10:26 +0000)
src/network.c

index 9ccb2b57b1ecf99e8b271f70abcfab3b98ffe349..66314f907e7f9b159f271d6e847e7a17355ad576 100644 (file)
@@ -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;channel<MAX_CONNECTIONS;channel++) {
-    if(!net->connection[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) {