- event_math(ivac->net.connection[channel].fd,event,READ,ADD);
- ivac_send_info(channel,ivac);
+ if(channel==N_E_ACCEPT)
+ sprintf(c_str,"accept failed");
+ else if(channel==N_E_MAXC)
+ sprintf(c_str,"maximum connections reached");
+ else {
+ sprintf(c_str,"connection from %s port %d on channel %d",
+ ivac->net.connection[channel].ip,
+ ivac->net.connection[channel].port,channel);
+ ivac_add_to_monitor(ivac,c_str);
+ event_math(ivac->net.connection[channel].fd,event,READ,ADD);
+ ivac_send_info(channel,ivac);
+ }
+ ivac_display_content(ivac);