]> www.hackdaworld.org Git - my-code/ivac.git/commitdiff
added network/event sync
authorhackbard <hackbard>
Sun, 9 May 2004 14:01:43 +0000 (14:01 +0000)
committerhackbard <hackbard>
Sun, 9 May 2004 14:01:43 +0000 (14:01 +0000)
src/ivac.c

index 9645c33f59444e0e74b66b9b85814c61e657cf9f..23d59b19cd498ec8ecd603cfe716c261b15e84f6 100644 (file)
@@ -183,11 +183,16 @@ int ivac_event_cb(t_event *event,void *ptr) {
     }
   }
 
     }
   }
 
-  /* receive info */
-  for(channel=0;channel<MAX_CONNECTIONS;channel++)
-    if(ivac->net.connection[channel].status&C_ESTABL)
+  for(channel=0;channel<MAX_CONNECTIONS;channel++) {
+    if(ivac->net.connection[channel].status&C_ESTABL) {
+      /* receive info */
       if(FD_ISSET(ivac->net.connection[channel].fd,&(event->rfds)))
         ivac_receive_info(channel,ivac);
       if(FD_ISSET(ivac->net.connection[channel].fd,&(event->rfds)))
         ivac_receive_info(channel,ivac);
+      /* sync network/event api */
+      if(!(FD_ISSET(ivac->net.connection[channel].fd,&(event->rfds_o))))
+        event_math(ivac->net.connection[channel].fd,event,READ,ADD);
+    }
+  } 
 
   /* user interaction */
   if(FD_ISSET(0,&(event->rfds)))
 
   /* user interaction */
   if(FD_ISSET(0,&(event->rfds)))