diff options
| author | rob rob@31f1291d-b8d6-0310-a050-a5561fc1590b <rob rob@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2004-09-19 10:28:02 +0000 |
|---|---|---|
| committer | rob rob@31f1291d-b8d6-0310-a050-a5561fc1590b <rob rob@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2004-09-19 10:28:02 +0000 |
| commit | fe0992a6aba0a7a95b666ecb52df8ce1a6d5a723 (patch) | |
| tree | 5d45b54d05662b624b86a12bf94bd586bf77e68a /src/memoserv.c | |
| parent | aa896a87ac4705a5a8a26cbf5ddae2db3fc54c62 (diff) | |
BUILD : 1.7.5 (351) BUGS : N/A NOTES : Rewrote the internals of moduleData, this will save _lots_ of memory especially on larger networks. The downside is modules using it need to make a tiny, tiny change... :/
git-svn-id: svn://svn.anope.org/anope/trunk@351 31f1291d-b8d6-0310-a050-a5561fc1590b
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@227 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/memoserv.c')
| -rw-r--r-- | src/memoserv.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/memoserv.c b/src/memoserv.c index e182f0535..716f1a1bc 100644 --- a/src/memoserv.c +++ b/src/memoserv.c @@ -192,7 +192,7 @@ static int delmemo(MemoInfo * mi, int num) break; } if (i < mi->memocount) { - moduleCleanStruct(mi->memos[i].moduleData); + moduleCleanStruct(&mi->memos[i].moduleData); free(mi->memos[i].text); /* Deallocate memo text memory */ mi->memocount--; /* One less memo now */ if (i < mi->memocount) /* Move remaining memos down a slot */ @@ -315,8 +315,7 @@ void memo_send(User * u, char *name, char *text, int z) mi->memos = srealloc(mi->memos, sizeof(Memo) * mi->memocount); m = &mi->memos[mi->memocount - 1]; strscpy(m->sender, source, NICKMAX); - for (j = 0; j < MAX_CMD_HASH; j++) - m->moduleData[j] = NULL; + m->moduleData = NULL; if (mi->memocount > 1) { m->number = m[-1].number + 1; if (m->number < 1) { @@ -786,7 +785,7 @@ static int do_del(User * u) /* Delete all memos. */ for (i = 0; i < mi->memocount; i++) { free(mi->memos[i].text); - moduleCleanStruct(mi->memos[i].moduleData); + moduleCleanStruct(&mi->memos[i].moduleData); } free(mi->memos); mi->memos = NULL; |
