changeset 6099:55f421732727

[gaim-migrate @ 6558] Andrew Steets (asteets) writes: " "fixes" bug #748450 and gives expected behavior according to plugins/PERL-HOWTO. For example, if you return non-zero fom an event_im_recv handler, the text is never displayed in the window. doesnt seem to break anything." committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Sat, 12 Jul 2003 14:04:05 +0000
parents dbeaa5530f78
children 5823ed7e2583
files src/event.c
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/event.c	Sat Jul 12 04:31:30 2003 +0000
+++ b/src/event.c	Sat Jul 12 14:04:05 2003 +0000
@@ -173,6 +173,7 @@
 	GList *l;
 	GaimSignalCallback *g;
 	GaimSignalBroadcaster *broadcaster;
+	int retval = 0;
 	va_list arrg;
 	void    *arg1 = NULL, *arg2 = NULL, *arg3 = NULL, *arg4 = NULL;
 
@@ -295,14 +296,14 @@
 		}
 	}
 
-	for (l = broadcasters; l != NULL; l = l->next) {
+	for (l = broadcasters; l != NULL && retval == 0; l = l->next) {
 		broadcaster = l->data;
 
 		va_start(arrg, event);
-		broadcaster->func(event, broadcaster->data, arrg);
+		retval = broadcaster->func(event, broadcaster->data, arrg);
 	}
 
-	return 0;
+	return retval;
 }
 
 const char *