Fix memory counting bugs for jupes and glines.
authorMichael Poole <mdpoole@troilus.org>
Fri, 14 May 2004 12:50:32 +0000 (12:50 +0000)
committerMichael Poole <mdpoole@troilus.org>
Fri, 14 May 2004 12:50:32 +0000 (12:50 +0000)
git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@1045 c9e4aea6-c8fd-4c43-8297-357d70d61c8c

ChangeLog
ircd/gline.c
ircd/jupe.c

index 39904216f85178366012d60deab6e2d4dd1bdd2a..eebf019c8acc785af5b82bcda1ad62ddd8ed17e8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2004-05-14  Matthias Crauwels <ultimate_@wol.be>
+
+       [Original ChangeLog date: 2003-06-08 -MP]
+       
+       * ircd/gline.c: fixed the counting bug in gline_memory_count
+       * ircd/jupe.c: fixed the counting bug in jupe_memory_count
+
 2004-05-14  Michael Poole <mdpoole@troilus.org>
 
        * ircd/m_mode.c (ms_mode): Do not always try to call
index 23a254f30f3a7a963cc49d07f596c55fa5f5cad1..dd85368f5e0f7829fa3e74966b3ceb3bbb677490 100644 (file)
@@ -753,10 +753,10 @@ gline_memory_count(size_t *gl_size)
   for (gline = GlobalGlineList; gline; gline = gline->gl_next)
   {
     gl++;
-    gl_size += sizeof(struct Gline);
-    gl_size += gline->gl_user ? (strlen(gline->gl_user) + 1) : 0;
-    gl_size += gline->gl_host ? (strlen(gline->gl_host) + 1) : 0;
-    gl_size += gline->gl_reason ? (strlen(gline->gl_reason) + 1) : 0;
+    *gl_size += sizeof(struct Gline);
+    *gl_size += gline->gl_user ? (strlen(gline->gl_user) + 1) : 0;
+    *gl_size += gline->gl_host ? (strlen(gline->gl_host) + 1) : 0;
+    *gl_size += gline->gl_reason ? (strlen(gline->gl_reason) + 1) : 0;
   }
   return gl;
 }
index e76455b2b338b7e3ed4df07a938ef10c81e16524..e54d0608a4526caad48110c6dcc92c9326966e89 100644 (file)
@@ -341,9 +341,9 @@ jupe_memory_count(size_t *ju_size)
   for (jupe = GlobalJupeList; jupe; jupe = jupe->ju_next)
   {
     ju++;
-    ju_size += sizeof(struct Jupe);
-    ju_size += jupe->ju_server ? (strlen(jupe->ju_server) + 1) : 0;
-    ju_size += jupe->ju_reason ? (strlen(jupe->ju_reason) + 1) : 0;
+    *ju_size += sizeof(struct Jupe);
+    *ju_size += jupe->ju_server ? (strlen(jupe->ju_server) + 1) : 0;
+    *ju_size += jupe->ju_reason ? (strlen(jupe->ju_reason) + 1) : 0;
   }
   return ju;
 }