changeset 23974:1f92d4aa8f3b

Return FALSE when a perl plugin cannot be loaded.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Mon, 01 Sep 2008 16:45:01 +0000
parents 1b882e539c40
children e2a610871476
files libpurple/plugins/perl/perl.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/plugins/perl/perl.c	Mon Sep 01 16:17:17 2008 +0000
+++ b/libpurple/plugins/perl/perl.c	Mon Sep 01 16:45:01 2008 +0000
@@ -466,6 +466,7 @@
 load_perl_plugin(PurplePlugin *plugin)
 {
 	PurplePerlScript *gps = (PurplePerlScript *)plugin->info->extra_info;
+	gboolean loaded = TRUE;
 	char *atmp[3] = { plugin->path, NULL, NULL };
 
 	if (gps == NULL || gps->load_sub == NULL)
@@ -501,6 +502,7 @@
 			purple_debug(PURPLE_DEBUG_ERROR, "perl",
 			           "Perl function %s exited abnormally: %s\n",
 			           gps->load_sub, SvPVutf8_nolen(ERRSV));
+			loaded = FALSE;
 		}
 
 		PUTBACK;
@@ -508,7 +510,7 @@
 		LEAVE;
 	}
 
-	return TRUE;
+	return loaded;
 }
 
 static void