comparison src/plugin.c @ 10124:b4efa002dad8

[gaim-migrate @ 11161] warnings -= 3; committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Tue, 19 Oct 2004 04:32:56 +0000
parents 9fdbfe832fac
children 4d484e455839
comparison
equal deleted inserted replaced
10123:1369e3ae9c9d 10124:b4efa002dad8
175 gaim_plugin_probe(const char *filename) 175 gaim_plugin_probe(const char *filename)
176 { 176 {
177 #ifdef GAIM_PLUGINS 177 #ifdef GAIM_PLUGINS
178 GaimPlugin *plugin = NULL; 178 GaimPlugin *plugin = NULL;
179 GaimPlugin *loader; 179 GaimPlugin *loader;
180 gpointer unpunned;
180 gboolean (*gaim_init_plugin)(GaimPlugin *); 181 gboolean (*gaim_init_plugin)(GaimPlugin *);
181 182
182 gaim_debug_misc("plugins", "probing %s\n", filename); 183 gaim_debug_misc("plugins", "probing %s\n", filename);
183 g_return_val_if_fail(filename != NULL, NULL); 184 g_return_val_if_fail(filename != NULL, NULL);
184 185
205 206
206 return NULL; 207 return NULL;
207 } 208 }
208 209
209 if (!g_module_symbol(plugin->handle, "gaim_init_plugin", 210 if (!g_module_symbol(plugin->handle, "gaim_init_plugin",
210 (gpointer *)&gaim_init_plugin)) { 211 &unpunned)) {
211 g_module_close(plugin->handle); 212 g_module_close(plugin->handle);
212 plugin->handle = NULL; 213 plugin->handle = NULL;
213 214
214 error = g_module_error(); 215 error = g_module_error();
215 gaim_debug(GAIM_DEBUG_ERROR, "plugins", "%s is unloadable: %s\n", 216 gaim_debug(GAIM_DEBUG_ERROR, "plugins", "%s is unloadable: %s\n",
217 218
218 gaim_plugin_destroy(plugin); 219 gaim_plugin_destroy(plugin);
219 220
220 return NULL; 221 return NULL;
221 } 222 }
223 gaim_init_plugin = unpunned;
222 } 224 }
223 else { 225 else {
224 loader = find_loader_for_plugin(plugin); 226 loader = find_loader_for_plugin(plugin);
225 227
226 if (loader == NULL) { 228 if (loader == NULL) {