changeset 13135:7fd39c81d5e9

[gaim-migrate @ 15497] Rest of SF Patch #1417219 from Sadrul "Also, loading/unloading plugins gives errors in the debug-window. Register/unregistering the plugins when they are created and destroyed seem to quiet it down. Turns out, the same is done for all the other core-subtypes." committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Mon, 06 Feb 2006 07:53:51 +0000
parents b2d838b7eb00
children d38aadce44c5
files src/plugin.c
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/plugin.c	Mon Feb 06 07:52:40 2006 +0000
+++ b/src/plugin.c	Mon Feb 06 07:53:51 2006 +0000
@@ -22,6 +22,7 @@
 #include "internal.h"
 
 #include "accountopt.h"
+#include "dbus-maybe.h"
 #include "debug.h"
 #include "notify.h"
 #include "prefs.h"
@@ -191,6 +192,8 @@
 	plugin->native_plugin = native;
 	plugin->path = (path == NULL ? NULL : g_strdup(path));
 
+	GAIM_DBUS_REGISTER_POINTER(plugin, GaimPlugin);
+
 	return plugin;
 }
 
@@ -761,6 +764,9 @@
 			plugin->info->major_version != GAIM_MAJOR_VERSION) {
 		if(plugin->handle)
 			g_module_close(plugin->handle);
+
+		GAIM_DBUS_UNREGISTER_POINTER(plugin);
+	
 		g_free(plugin);
 		return;
 	}
@@ -829,6 +835,8 @@
 	if (plugin->path  != NULL) g_free(plugin->path);
 	if (plugin->error != NULL) g_free(plugin->error);
 
+	GAIM_DBUS_UNREGISTER_POINTER(plugin);
+
 	g_free(plugin);
 #endif /* !GAIM_PLUGINS */
 }