httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pque...@apache.org
Subject svn commit: r708825 - /httpd/httpd/trunk/modules/test/mod_dialup.c
Date Wed, 29 Oct 2008 08:33:27 GMT
Author: pquerna
Date: Wed Oct 29 01:33:26 2008
New Revision: 708825

URL: http://svn.apache.org/viewvc?rev=708825&view=rev
Log:
Cleanup mod_dialup to compile with -std=c89 and -pedantic.

Modified:
    httpd/httpd/trunk/modules/test/mod_dialup.c

Modified: httpd/httpd/trunk/modules/test/mod_dialup.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/test/mod_dialup.c?rev=708825&r1=708824&r2=708825&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/test/mod_dialup.c (original)
+++ httpd/httpd/trunk/modules/test/mod_dialup.c Wed Oct 29 01:33:26 2008
@@ -17,15 +17,19 @@
 
 
 #include "httpd.h"
+/* to detect sendfile enabled, we need CORE_PRIVATE. Someone should fix this. */
+#define CORE_PRIVATE
+#include "http_core.h"
+
 #include "util_filter.h"
 #include "http_log.h"
 #include "http_config.h"
 #include "http_request.h"
+#include "http_protocol.h"
+
 
-/* to detect sendfile enabled, we need CORE_PRIVATE. Someone should fix this. */
-#define CORE_PRIVATE
-#include "http_core.h"
 
+#include "ap_mpm.h"
 
 module AP_MODULE_DECLARE_DATA dialup_module;
 
@@ -137,6 +141,12 @@
 {
     int status;
     apr_status_t rv;
+    dialup_dcfg_t *dcfg;
+    core_dir_config *ccfg;
+    apr_file_t *fd;
+    dialup_baton_t *db;
+    apr_bucket *e;
+
 
     /* See core.c, default handler for all of the cases we just decline. */
     if (r->method_number != M_GET || 
@@ -145,15 +155,16 @@
         return DECLINED;
     }
 
-    dialup_dcfg_t *dcfg = ap_get_module_config(r->per_dir_config,
-                                               &dialup_module);
+    dcfg = ap_get_module_config(r->per_dir_config,
+                                &dialup_module);
+
     if (dcfg->bytes_per_second == 0) {
         return DECLINED;
     }
-    core_dir_config *ccfg = ap_get_module_config(r->per_dir_config,
-                                                     &core_module);
-    
-    apr_file_t *fd;
+
+    ccfg = ap_get_module_config(r->per_dir_config,
+                                &core_module);
+
 
     rv = apr_file_open(&fd, r->filename, APR_READ | APR_BINARY
 #if APR_HAS_SENDFILE
@@ -180,15 +191,11 @@
         return DECLINED;
     }
 
-    apr_bucket_brigade *bb;
-
-    dialup_baton_t *db = apr_palloc(r->pool, sizeof(dialup_baton_t));
+    db = apr_palloc(r->pool, sizeof(dialup_baton_t));
     
     db->bb = apr_brigade_create(r->pool, r->connection->bucket_alloc);
     db->tmpbb = apr_brigade_create(r->pool, r->connection->bucket_alloc);
 
-    apr_bucket *e;
-
     e = apr_brigade_insert_file(db->bb, fd, 0, r->finfo.size, r->pool);
 
 #if APR_HAS_MMAP
@@ -293,7 +300,7 @@
     AP_INIT_TAKE1("ModemStandard", cmd_modem_standard, NULL, ACCESS_CONF,
                   "Modem Standard to.. simulate. "
                   "Must be one of: 'V.21', 'V.26bis', 'V.32', 'V.34', or 'V.92'"),
-    NULL
+    {NULL}
 };
 
 module AP_MODULE_DECLARE_DATA dialup_module =



Mime
View raw message