From a16cbf9a3524bd2eed106a5c167bd0804198ac8c Mon Sep 17 00:00:00 2001 From: "trystan trystan@31f1291d-b8d6-0310-a050-a5561fc1590b" Date: Mon, 6 Dec 2004 19:52:28 +0000 Subject: [PATCH] BUILD : 1.7.6 (479) BUGS : 239 NOTES : Fixes infinite loop with moduleGetData() git-svn-id: svn://svn.anope.org/anope/trunk@479 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@333 5417fbe8-f217-4b02-8779-1006273d7864 --- Changes | 1 + src/modules.c | 8 ++++++++ version.log | 6 +++++- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/Changes b/Changes index 6744a5795..4f4caea17 100644 --- a/Changes +++ b/Changes @@ -13,6 +13,7 @@ Provided by Anope Dev. - 2004 11/19 A Added anope_cmd_ctcp() to code API, for sending CTCP messages. [ #00] 11/18 A Unable to use registered nicknames as bot nicks from now on. [ #00] 11/18 A NSAddAccessOnReg to control access list on registration. [ #00] +12/06 F Fixes infinite loop with moduleGetData() [#239] 12/05 F CS CLEAR OPS strips +a/+q modes, and uses SVSMODE where possible [ #00] 12/05 F Ultimate3 not setting +a on channel admins [ #00] 12/04 F Cleaned up some memory warnings found with Valgrind [ #00] diff --git a/src/modules.c b/src/modules.c index 787afe894..072d0f915 100644 --- a/src/modules.c +++ b/src/modules.c @@ -1852,12 +1852,20 @@ int moduleAddData(ModuleData **md, char *key, char *value) **/ char *moduleGetData(ModuleData **md, char *key) { + char *mod_name = sstrdup(mod_current_module_name); ModuleData *current = *md; + + if (debug) { + alog("debug: moduleGetData %p : key %s", (void *) md, key); + alog("debug: Current Module %s", mod_name); + } + while(current) { if((stricmp(current->moduleName,mod_name)==0) && (stricmp(current->key,key)==0)) { return sstrdup(current->value); } + current = current->next; } free(mod_name); return NULL; diff --git a/version.log b/version.log index 284374477..4e0193e3f 100644 --- a/version.log +++ b/version.log @@ -8,10 +8,14 @@ VERSION_MAJOR="1" VERSION_MINOR="7" VERSION_PATCH="6" -VERSION_BUILD="478" +VERSION_BUILD="479" # $Log$ # +# BUILD : 1.7.6 (479) +# BUGS : 239 +# NOTES : Fixes infinite loop with moduleGetData() +# # BUILD : 1.7.6 (478) # BUGS : N/A # NOTES : 1. CS CLEAR strips +q/+a