# HG changeset patch # User Etan Reisner # Date 1137907058 0 # Node ID d1e6890ed062c6f07cfbbfc1badeea3b205d4d95 # Parent 92ae94619e2c74833a027aaf54a67f749e95c704 [gaim-migrate @ 15337] Perl plugins now have ids. Not having them was causing crashes with the dependent plugin unloading stuff. Some fixes to that code in a minute. committer: Tailor Script diff -r 92ae94619e2c -r d1e6890ed062 plugins/perl/perl.c --- a/plugins/perl/perl.c Sun Jan 22 05:11:13 2006 +0000 +++ b/plugins/perl/perl.c Sun Jan 22 05:17:38 2006 +0000 @@ -299,6 +299,8 @@ /* We know this one exists. */ key = hv_fetch(plugin_info, "name", strlen("name"), 0); info->name = g_strdup(SvPV(*key, len)); + /* Set id here in case we don't find one later. */ + info->id = g_strdup(SvPV(*key, len)); if ((key = hv_fetch(plugin_info, "GTK_UI", strlen("GTK_UI"), 0))) @@ -324,11 +326,10 @@ strlen("version"), 0))) info->version = g_strdup(SvPV(*key, len)); - if ((key = hv_fetch(plugin_info, "load", - strlen("load"), 0))) - gps->load_sub = g_strdup_printf("%s::%s", - gps->package, - SvPV(*key, len)); + /* We know this one exists. */ + key = hv_fetch(plugin_info, "load", strlen("load"), 0); + gps->load_sub = g_strdup_printf("%s::%s", gps->package, + SvPV(*key, len)); if ((key = hv_fetch(plugin_info, "unload", strlen("unload"), 0))) @@ -336,6 +337,13 @@ gps->package, SvPV(*key, len)); + if ((key = hv_fetch(plugin_info, "id", + strlen("id"), 0))) { + g_free(info->id); + info->id = g_strdup_printf("perl-%s", + SvPV(*key, len)); + } + /********************************************************/ /* Only one of the next two options should be present */ /* */