e616c4c47e
- Dropped init-resize-crash-fix (upstreamed) - Fixed bogus date in changelog (best effort) - Disabled unloading static modules (by no-static-unload patch)
36 lines
1.0 KiB
Diff
36 lines
1.0 KiB
Diff
--- irssi-0.8.15/src/fe-common/core/fe-modules.c.old 2010-04-03 18:19:24.000000000 +0200
|
|
+++ irssi-0.8.15/src/fe-common/core/fe-modules.c 2010-10-12 14:43:52.586315553 +0200
|
|
@@ -195,6 +195,8 @@
|
|
MODULE_FILE_REC *file;
|
|
char *rootmodule, *submodule;
|
|
void *free_arg;
|
|
+ GSList *tmp;
|
|
+ int all_dynamic;
|
|
|
|
g_return_if_fail(data != NULL);
|
|
|
|
@@ -204,12 +206,19 @@
|
|
|
|
module = module_find(rootmodule);
|
|
if (module != NULL) {
|
|
- if (*submodule == '\0')
|
|
- module_unload(module);
|
|
+ if (*submodule == '\0') {
|
|
+ all_dynamic = 1;
|
|
+ for (tmp = module->files; tmp != NULL; tmp = tmp->next)
|
|
+ all_dynamic &= !MODULE_IS_STATIC((MODULE_FILE_REC*) tmp->data);
|
|
+ if (all_dynamic)
|
|
+ module_unload(module);
|
|
+ }
|
|
else {
|
|
file = module_file_find(module, submodule);
|
|
- if (file != NULL)
|
|
- module_file_unload(file);
|
|
+ if (file != NULL) {
|
|
+ if (!MODULE_IS_STATIC(file))
|
|
+ module_file_unload(file);
|
|
+ }
|
|
else
|
|
module = NULL;
|
|
}
|