370 |
static void handle_connection(Event_T E) { |
static void handle_connection(Event_T E) { |
371 |
|
|
372 |
Port_T p; |
Port_T p; |
373 |
|
Icmp_T i; |
374 |
Service_T s= E->source; |
Service_T s= E->source; |
375 |
|
|
376 |
/* Check for executables to run */ |
/* Check for executables to run in the port list*/ |
377 |
for(p= s->portlist; p; p= p->next) { |
for(p= s->portlist; p; p= p->next) { |
378 |
if(p->event_flag && p->exec != NULL) { |
if(p->event_flag && p->exec != NULL) { |
379 |
/* Reset the event_flag so the command is not executed again |
/* Reset the event_flag so the command is not executed again |
383 |
} |
} |
384 |
} |
} |
385 |
|
|
386 |
|
/* Check for executables to run in the icmp list */ |
387 |
|
for(i= s->icmplist; i; i= i->next) { |
388 |
|
if(i->event_flag && i->exec != NULL) { |
389 |
|
i->event_flag= FALSE; |
390 |
|
spawn(s, i->exec, EVENT_DESCRIPTION(E)); |
391 |
|
} |
392 |
|
} |
393 |
|
|
394 |
} |
} |
395 |
|
|
396 |
|
|