mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05:00
signal_stop(); signal_emit("same signal", ...); didn't work. other way
around it did though git-svn-id: http://svn.irssi.org/repos/irssi/trunk@785 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
e0bc134d66
commit
b875e2e29d
@ -183,7 +183,11 @@ static int signal_emit_real(SIGNAL_REC *rec, gconstpointer *arglist)
|
||||
{
|
||||
SIGNAL_REC *prev_emitted_signal;
|
||||
SIGNAL_FUNC func;
|
||||
int n, index, stopped;
|
||||
int n, index, stopped, stop_emit_count;
|
||||
|
||||
/* signal_stop_by_name("signal"); signal_emit("signal", ...);
|
||||
fails if we compare rec->stop_emit against 0. */
|
||||
stop_emit_count = rec->stop_emit;
|
||||
|
||||
stopped = FALSE;
|
||||
rec->emitting++;
|
||||
@ -202,7 +206,7 @@ static int signal_emit_real(SIGNAL_REC *rec, gconstpointer *arglist)
|
||||
current_emitted_signal = prev_emitted_signal;
|
||||
}
|
||||
|
||||
if (rec->stop_emit) {
|
||||
if (rec->stop_emit != stop_emit_count) {
|
||||
stopped = TRUE;
|
||||
rec->stop_emit--;
|
||||
n = SIGNAL_LISTS;
|
||||
@ -212,10 +216,16 @@ static int signal_emit_real(SIGNAL_REC *rec, gconstpointer *arglist)
|
||||
}
|
||||
rec->emitting--;
|
||||
|
||||
if (!rec->emitting && rec->altered) {
|
||||
if (!rec->emitting) {
|
||||
if (rec->stop_emit != 0) {
|
||||
/* signal_stop() used too many times */
|
||||
rec->stop_emit = 0;
|
||||
}
|
||||
if (rec->altered) {
|
||||
signal_list_clean(rec);
|
||||
rec->altered = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
return stopped;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user