projects
/
my-code
/
ivac.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added network/event sync
[my-code/ivac.git]
/
src
/
ivac.c
diff --git
a/src/ivac.c
b/src/ivac.c
index
9645c33
..
23d59b1
100644
(file)
--- a/
src/ivac.c
+++ b/
src/ivac.c
@@
-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)))