1
0
mirror of https://github.com/irssi/irssi.git synced 2024-11-03 04:27:19 -05:00

Allow stopping signal more than once without sending GLib warning

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1061 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2001-01-04 17:27:21 +00:00 committed by cras
parent 60df6d7be8
commit f3f80c1499

View File

@ -282,9 +282,9 @@ void signal_stop(void)
SIGNAL_REC *rec;
rec = current_emitted_signal;
if (rec == NULL || rec->emitting <= rec->stop_emit)
if (rec == NULL)
g_warning("signal_stop() : no signals are being emitted currently");
else
else if (rec->emitting > rec->stop_emit)
rec->stop_emit++;
}
@ -298,9 +298,7 @@ void signal_stop_by_name(const char *signal)
rec = g_hash_table_lookup(signals, GINT_TO_POINTER(signal_id));
if (rec == NULL)
g_warning("signal_stop_by_name() : unknown signal \"%s\"", signal);
else if (rec->emitting <= rec->stop_emit)
g_warning("signal_stop_by_name() : signal \"%s\" not being emitted", signal);
else
else if (rec->emitting > rec->stop_emit)
rec->stop_emit++;
}