mirror of
https://github.com/anope/anope.git
synced 2026-07-10 13:03:12 +02:00
BUILD : 1.7.21 (1354) BUGS : 833 NOTES : Ficed various oddities in moduleAddData()
git-svn-id: svn://svn.anope.org/anope/trunk@1354 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1069 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
parent
b8bd618303
commit
721a24ae21
@@ -6,6 +6,7 @@ Anope Version S V N
|
||||
01/15 F listnicks now shows if a nickname is suspended. [#825]
|
||||
01/15 F Re-assigned access to OS CHANLIST to Services Opers. [#827]
|
||||
01/24 F Several language errors. [ #00]
|
||||
01/26 F Various oddities in moduleAddData(). [#833]
|
||||
|
||||
Provided by Jan Milants <jan_renee@msn.com> - 2008
|
||||
01/16 F Server traversion with next_server() failed to list all servers. [#831]
|
||||
|
||||
+6
-16
@@ -2143,42 +2143,32 @@ int moduleDataDebug(ModuleData ** md)
|
||||
**/
|
||||
int moduleAddData(ModuleData ** md, char *key, char *value)
|
||||
{
|
||||
/* Do we really need this sstrdup here? Why can't we just use
|
||||
* mod_current_module_name itself inside this function? It's not like
|
||||
* we're changing it or anything, we just pass it to yet another
|
||||
* sstrdup() somewhere down there.... -GD
|
||||
*/
|
||||
char *mod_name = sstrdup(mod_current_module_name);
|
||||
ModuleData *newData = NULL;
|
||||
|
||||
if (!key || !value) {
|
||||
alog("A module tried to use ModuleAddData() with one ore more NULL arguments... returning");
|
||||
free(mod_name);
|
||||
return MOD_ERR_PARAMS;
|
||||
}
|
||||
|
||||
if (mod_current_module_name == NULL) {
|
||||
alog("moduleAddData() called with mod_current_module_name being NULL");
|
||||
if (debug)
|
||||
do_backtrace(0);
|
||||
}
|
||||
|
||||
if (!key || !value) {
|
||||
alog("A module (%s) tried to use ModuleAddData() with one or more NULL arguments... returning", mod_current_module_name);
|
||||
return MOD_ERR_PARAMS;
|
||||
}
|
||||
|
||||
moduleDelData(md, key); /* Remove any existing module data for this module with the same key */
|
||||
|
||||
newData = malloc(sizeof(ModuleData));
|
||||
if (!newData) {
|
||||
free(mod_name);
|
||||
return MOD_ERR_MEMORY;
|
||||
}
|
||||
|
||||
newData->moduleName = sstrdup(mod_name);
|
||||
newData->moduleName = sstrdup(mod_current_module_name);
|
||||
newData->key = sstrdup(key);
|
||||
newData->value = sstrdup(value);
|
||||
newData->next = *md;
|
||||
*md = newData;
|
||||
|
||||
free(mod_name);
|
||||
|
||||
if (debug) {
|
||||
moduleDataDebug(md);
|
||||
}
|
||||
|
||||
+5
-1
@@ -9,10 +9,14 @@ VERSION_MAJOR="1"
|
||||
VERSION_MINOR="7"
|
||||
VERSION_PATCH="21"
|
||||
VERSION_EXTRA="-svn"
|
||||
VERSION_BUILD="1353"
|
||||
VERSION_BUILD="1354"
|
||||
|
||||
# $Log$
|
||||
#
|
||||
# BUILD : 1.7.21 (1354)
|
||||
# BUGS : 833
|
||||
# NOTES : Ficed various oddities in moduleAddData()
|
||||
#
|
||||
# BUILD : 1.7.21 (1353)
|
||||
# BUGS :
|
||||
# NOTES : Rules for Changes: [[1]] A always goes before F (and anything else in between) [[2]] Anything within an A-block or F-block for 1 version is sorted ascending on the date (newer lines on the bottom) [[3]] Lines end with a period.
|
||||
|
||||
Reference in New Issue
Block a user