/[pengfork]/pengfork/src/engine.c
ViewVC logotype

Diff of /pengfork/src/engine.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.10 by chupa, Sun Dec 1 01:19:07 2002 UTC revision 1.11 by chupa, Tue Dec 3 18:38:15 2002 UTC
# Line 115  engine_loop () Line 115  engine_loop ()
115            tv.tv_usec = 0;            tv.tv_usec = 0;
116            fds = select (maxfd + 1, &rfdset, &wfdset, NULL, &tv);            fds = select (maxfd + 1, &rfdset, &wfdset, NULL, &tv);
117          }          }
118          
119          /* FIXME: find a better way of doing this */
120          if(!haccess->is_connected())
121            engine_stop();
122          
123        if (fds > 0)        if (fds > 0)
124          {          {
125            engine_read (&rfdset);            engine_read (&rfdset);
# Line 178  engine_register (fd, timeout, fn) Line 182  engine_register (fd, timeout, fn)
182    client[index].timeout = timeout;    client[index].timeout = timeout;
183    client[index].last_timeout = 0;    client[index].last_timeout = 0;
184    client[index].fn = fn;    client[index].fn = fn;
185      client[index].lastread = time (NULL);
186    init_buffer (&client[index].in);    init_buffer (&client[index].in);
187    init_buffer (&client[index].out);    init_buffer (&client[index].out);
188    
# Line 205  engine_unregister (fd) Line 210  engine_unregister (fd)
210    if (index == -1)    if (index == -1)
211      return;      return;
212    
213      destroy_buffer(&client[index].in);
214      destroy_buffer(&client[index].out);
215    if (index < nbclients - 1)    if (index < nbclients - 1)
216      {      {
217        /* Shift all next clients */        /* Shift all next clients */
# Line 273  engine_read (fdset) Line 280  engine_read (fdset)
280       fd_set *fdset;       fd_set *fdset;
281  {  {
282    int i;    int i;
283      
284    for (i = 0; i < nbclients; i++)    for (i = 0; i < nbclients; i++)
285      {      {
286        if (FD_ISSET (client[i].fd, fdset))        if (FD_ISSET (client[i].fd, fdset))

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26