comparison libpurple/plugin.c @ 15876:80ee585fb53c

SF Patch #1686400 from Eoin Coffey ("ecoffey") ecoffey described the changes: 1) Small tweaks to the loader to bring it up to speed with new mono versions and API wrapper changes that grim had made. (was in original patch, just forgot about it :-P) 2) .NET Plugins are now required to define an Id as part of their info. 3) Modified gaim_probe_plugin to check for existence of info->id and to make sure it's not empty; Prints an error, stores an error in the plugin and sets plugin->unloadable = TRUE.
author Richard Laager <rlaager@wiktel.com>
date Sat, 24 Mar 2007 06:24:59 +0000
parents 32c366eeeb99
children ab2f466b6a13 4a7a13521709
comparison
equal deleted inserted replaced
15874:23367ba62f59 15876:80ee585fb53c
367 purple_debug_error("plugins", "%s is not loadable: The UI requirement is not met.\n", plugin->path); 367 purple_debug_error("plugins", "%s is not loadable: The UI requirement is not met.\n", plugin->path);
368 plugin->unloadable = TRUE; 368 plugin->unloadable = TRUE;
369 return plugin; 369 return plugin;
370 } 370 }
371 371
372 /*
373 * Check to make sure a plugin has defined an id.
374 * Not having this check caused purple_plugin_unload to
375 * enter an infinite loop in certain situations by passing
376 * purple_find_plugin_by_id a NULL value. -- ecoffey
377 */
378 if (!plugin->info->id || !strcmp(plugin->info->id, ""))
379 {
380 plugin->error = g_strdup_printf(_("This plugin has not defined an ID."));
381 purple_debug_error("plugins", "%s is not loadable: info->id is not defined.\n", plugin->path);
382 plugin->unloadable = TRUE;
383 return plugin;
384 }
385
372 /* Really old plugins. */ 386 /* Really old plugins. */
373 if (plugin->info->magic != PURPLE_PLUGIN_MAGIC) 387 if (plugin->info->magic != PURPLE_PLUGIN_MAGIC)
374 { 388 {
375 if (plugin->info->magic >= 2 && plugin->info->magic <= 4) 389 if (plugin->info->magic >= 2 && plugin->info->magic <= 4)
376 { 390 {