# HG changeset patch # User Richard Laager # Date 1139212431 0 # Node ID 7fd39c81d5e9d21bcd30b07778e4521ac2fa752e # Parent b2d838b7eb007cd29fdd2c4d5bf847e5a044c8bc [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 diff -r b2d838b7eb00 -r 7fd39c81d5e9 src/plugin.c --- 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 */ }