src/module.c

changeset 2405
967eeb138686
parent 2393
cfef0212506b
child 2414
a11c09988b8e
equal deleted inserted replaced
2404:82282183830e 2405:967eeb138686
49 49
50 /* ------------------ Global Variables ----------------------- */ 50 /* ------------------ Global Variables ----------------------- */
51 51
52 GList *plugins = NULL; 52 GList *plugins = NULL;
53 GList *callbacks = NULL; 53 GList *callbacks = NULL;
54
55 char *last_dir = NULL;
54 56
55 /* --------------- Function Declarations --------------------- */ 57 /* --------------- Function Declarations --------------------- */
56 58
57 struct gaim_plugin * load_plugin(char *); 59 struct gaim_plugin * load_plugin(char *);
58 void unload_plugin(struct gaim_plugin *p); 60 void unload_plugin(struct gaim_plugin *p);
89 return reload_plugin(plug); 91 return reload_plugin(plug);
90 } else 92 } else
91 c = g_list_next(c); 93 c = g_list_next(c);
92 } 94 }
93 plug = g_malloc(sizeof *plug); 95 plug = g_malloc(sizeof *plug);
96
97 if (last_dir)
98 g_free(last_dir);
99 last_dir = g_dirname(filename);
94 100
95 debug_printf("Loading %s\n", filename); 101 debug_printf("Loading %s\n", filename);
96 plug->handle = g_module_open(filename, 0); 102 plug->handle = g_module_open(filename, 0);
97 if (!plug->handle) { 103 if (!plug->handle) {
98 error = (char *)g_module_error(); 104 error = (char *)g_module_error();

mercurial