Changeset 43 for trunk/spreadlogd.c

Show
Ignore:
Timestamp:
05/05/06 20:33:14 (9 years ago)
Author:
jesus
Message:

only add an event if it a new connection

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/spreadlogd.c

    r42 r43  
    8080                sc->port, mbox); 
    8181      sc->fd = mbox; 
     82      event_set(&sc->event, mbox, EV_READ|EV_PERSIST, handle_message, sc); 
     83      event_add(&sc->event, NULL); 
    8284    } 
    8385    sc->connected = 1; 
    8486    if(*todo & _TODO_JOIN) 
    8587      config_foreach_logfacility(sc, join, &mbox); 
    86     event_set(&sc->event, mbox, EV_READ|EV_PERSIST, handle_message, sc); 
    87     event_add(&sc->event, NULL); 
    8888    return mbox; 
    8989  }