[cvslog] (2006-01-06 19:01:50 UTC) Module eggdrop1.9: Change committed!

cvslog cvs at tsss.org
Fri Jan 6 13:01:51 CST 2006


CVSROOT    : /usr/local/cvsroot
Module     : eggdrop1.9
Commit time: 2006-01-06 19:01:50 UTC
Commited by: sven

Modified files:
     lib/eggdrop/module.c

Log message:

 * unload all modules on .restart

With this fix restarting the bot seems to work. valgrind does not pick up
any more corruptions and I didn't notice any obvious bugs but there might
still be leaks around.

---------------------- diff included ----------------------
Index: eggdrop1.9/lib/eggdrop/module.c
diff -u eggdrop1.9/lib/eggdrop/module.c:1.8 eggdrop1.9/lib/eggdrop/module.c:1.9
--- eggdrop1.9/lib/eggdrop/module.c:1.8	Wed Dec 28 11:27:31 2005
+++ eggdrop1.9/lib/eggdrop/module.c	Fri Jan  6 13:01:40 2006
@@ -18,7 +18,7 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: module.c,v 1.8 2005-12-28 17:27:31 sven Exp $";
+static const char rcsid[] = "$Id: module.c,v 1.9 2006-01-06 19:01:40 sven Exp $";
 #endif
 
 #include <eggdrop/eggdrop.h>
@@ -54,6 +54,11 @@
 
 int module_shutdown(void)
 {
+	module_list_t **entry = &module_list_head;
+
+	while (*entry) {
+		if (module_unload((*entry)->modinfo.name, MODULE_RESTART)) entry = &(*entry)->next;
+	}
 	bind_table_del(BT_load);
 	bind_table_del(BT_unload);
 
----------------------- End of diff -----------------------



More information about the Changes mailing list