httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From taka...@apache.org
Subject svn commit: r778433 - /httpd/httpd/trunk/support/logresolve.c
Date Mon, 25 May 2009 14:48:40 GMT
Author: takashi
Date: Mon May 25 14:48:38 2009
New Revision: 778433

URL: http://svn.apache.org/viewvc?rev=778433&view=rev
Log:
Kill the hardcoded values

Modified:
    httpd/httpd/trunk/support/logresolve.c

Modified: httpd/httpd/trunk/support/logresolve.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/support/logresolve.c?rev=778433&r1=778432&r2=778433&view=diff
==============================================================================
--- httpd/httpd/trunk/support/logresolve.c (original)
+++ httpd/httpd/trunk/support/logresolve.c Mon May 25 14:48:38 2009
@@ -68,6 +68,8 @@
 #include <stdlib.h>
 #endif
 
+#define READ_BUF_SIZE 10240
+#define WRITE_BUF_SIZE 10240
 #define LINE_BUF_SIZE 2048
 
 static apr_file_t *errfile;
@@ -189,14 +191,14 @@
 
 #if APR_MAJOR_VERSION > 1 || (APR_MAJOR_VERSION == 1 && APR_MINOR_VERSION >=
3)
     /* Allocate two new 10k file buffers */
-    if ((outbuffer = apr_palloc(pool, 10240)) == NULL ||
-        (inbuffer = apr_palloc(pool, 10240)) == NULL) {
+    if ((outbuffer = apr_palloc(pool, WRITE_BUF_SIZE)) == NULL ||
+        (inbuffer = apr_palloc(pool, READ_BUF_SIZE)) == NULL) {
         return 1;
     }
 
     /* Set the buffers */
-    apr_file_buffer_set(infile, inbuffer, 10240);
-    apr_file_buffer_set(outfile, outbuffer, 10240);
+    apr_file_buffer_set(infile, inbuffer, READ_BUF_SIZE);
+    apr_file_buffer_set(outfile, outbuffer, WRITE_BUF_SIZE);
 #endif
 
     cache = apr_hash_make(pool);



Mime
View raw message