diff options
author | Volker Lendecke <vlendec@samba.org> | 2007-01-21 17:58:56 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:43:55 -0500 |
commit | a8a702a6c94104ea31f3b5a4a5b11a297f66f0c2 (patch) | |
tree | c113abf4988e6f9b21b6467780fa348a41b1d5e5 /source4 | |
parent | cf8eef4ad88af40d2cf147686c1877cd380b452c (diff) | |
download | samba-a8a702a6c94104ea31f3b5a4a5b11a297f66f0c2.tar.gz samba-a8a702a6c94104ea31f3b5a4a5b11a297f66f0c2.tar.bz2 samba-a8a702a6c94104ea31f3b5a4a5b11a297f66f0c2.zip |
r20934: I *hate* deep indents :-)
(This used to be commit c98dd55e32a1d2df016e7a4deba218cd54efcdd2)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/lib/events/events_signal.c | 54 |
1 files changed, 28 insertions, 26 deletions
diff --git a/source4/lib/events/events_signal.c b/source4/lib/events/events_signal.c index e1a50e058f..7dd22e8972 100644 --- a/source4/lib/events/events_signal.c +++ b/source4/lib/events/events_signal.c @@ -185,38 +185,40 @@ int common_event_check_signal(struct event_context *ev) } for (i=0;i<NUM_SIGNALS+1;i++) { + struct signal_event *se, *next; uint32_t count = sig_state.signal_count[i]; - if (count != 0) { - struct signal_event *se, *next; - for (se=sig_state.sig_handlers[i];se;se=next) { - next = se->next; + + if (count == 0) { + continue; + } + for (se=sig_state.sig_handlers[i];se;se=next) { + next = se->next; #ifdef SA_SIGINFO - if (se->sa_flags & SA_SIGINFO) { - int j; - for (j=0;j<count;j++) { - se->handler(ev, se, i, 1, - (void*)&sig_state.sig_info[i][j], - se->private_data); - } - if (count == SA_INFO_QUEUE_COUNT) { - /* we'd filled the queue, unblock the - signal now */ - sigset_t set; - sigemptyset(&set); - sigaddset(&set, i); - sigprocmask(SIG_UNBLOCK, &set, NULL); - } - continue; + if (se->sa_flags & SA_SIGINFO) { + int j; + for (j=0;j<count;j++) { + se->handler(ev, se, i, 1, + (void*)&sig_state.sig_info[i][j], + se->private_data); } -#endif - se->handler(ev, se, i, count, NULL, se->private_data); - if (se->sa_flags & SA_RESETHAND) { - talloc_free(se); + if (count == SA_INFO_QUEUE_COUNT) { + /* we'd filled the queue, unblock the + signal now */ + sigset_t set; + sigemptyset(&set); + sigaddset(&set, i); + sigprocmask(SIG_UNBLOCK, &set, NULL); } + continue; + } +#endif + se->handler(ev, se, i, count, NULL, se->private_data); + if (se->sa_flags & SA_RESETHAND) { + talloc_free(se); } - sig_state.signal_count[i] -= count; - sig_state.got_signal -= count; } + sig_state.signal_count[i] -= count; + sig_state.got_signal -= count; } return 1; |