[prev in list] [next in list] [prev in thread] [next in thread]
List: proftpd-committers
Subject: [ProFTPD-committers] proftpd/contrib mod_log_forensic.c,1.3,1.4
From: TJ Saunders <castaglia () users ! sourceforge ! net>
Date: 2013-02-25 20:31:06
Message-ID: E1UA4ha-0007oA-3O () sfs-ml-2 ! v29 ! ch3 ! sourceforge ! com
[Download RAW message or body]
Update of /cvsroot/proftp/proftpd/contrib
In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv28076/contrib
Modified Files:
mod_log_forensic.c
Log Message:
Deal with Bug#3903 in mod_log_forensic by have a separate pool for each
log message object in the ring (and thus each message string is allocated
out of its own pool).
Index: mod_log_forensic.c
===================================================================
RCS file: /cvsroot/proftp/proftpd/contrib/mod_log_forensic.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- mod_log_forensic.c 21 Feb 2013 22:19:30 -0000 1.3
+++ mod_log_forensic.c 25 Feb 2013 20:31:04 -0000 1.4
@@ -73,7 +73,7 @@
*
* Why 256 messages per sub-pool?
*
- * 80 chars (avg) per message * 512 messages = 20 KB
+ * 80 chars (avg) per message * 256 messages = 20 KB
*
* This means that a given sub-pool will hold roughly 20 KB. Which means
* that 20 KB + ring max size is the largest memory that mod_log_forensic
@@ -112,6 +112,7 @@
static void forensic_add_msg(unsigned int log_type, int log_level,
const char *log_msg, size_t log_msglen) {
struct forensic_msg *fm;
+ pool *sub_pool;
/* Get the message that's currently in the ring where we want add our new
* one.
@@ -127,9 +128,9 @@
}
/* Add this message into the ring. */
-
- fm = pcalloc(forensic_subpool, sizeof(struct forensic_msg));
- fm->fm_pool = forensic_subpool;
+ sub_pool = pr_pool_create_sz(forensic_subpool, 128);
+ fm = pcalloc(sub_pool, sizeof(struct forensic_msg));
+ fm->fm_pool = sub_pool;
fm->fm_pool_msgno = forensic_subpool_msgno;
fm->fm_log_type = log_type;
fm->fm_log_level = log_level;
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
ProFTPD Committers Mailing List
proftpd-committers@proftpd.org
https://lists.sourceforge.net/lists/listinfo/proftp-committers
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic