httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rj...@apache.org
Subject svn commit: r990065 - in /httpd/test/framework/trunk/c-modules: eat_post/mod_eat_post.c echo_post/mod_echo_post.c echo_post_chunk/mod_echo_post_chunk.c
Date Fri, 27 Aug 2010 08:11:19 GMT
Author: rjung
Date: Fri Aug 27 08:11:18 2010
New Revision: 990065

URL: http://svn.apache.org/viewvc?rev=990065&view=rev
Log:
- Remove ifdefs from within ap_log_* calls.
  Fixes compilation problem with xlc on AIX
  against httpd 2.3.8+.
- Reintroduce Apache 1.3 compatibility in mod_echo_post
  (broken in r290160 and r947590).

Modified:
    httpd/test/framework/trunk/c-modules/eat_post/mod_eat_post.c
    httpd/test/framework/trunk/c-modules/echo_post/mod_echo_post.c
    httpd/test/framework/trunk/c-modules/echo_post_chunk/mod_echo_post_chunk.c

Modified: httpd/test/framework/trunk/c-modules/eat_post/mod_eat_post.c
URL: http://svn.apache.org/viewvc/httpd/test/framework/trunk/c-modules/eat_post/mod_eat_post.c?rev=990065&r1=990064&r2=990065&view=diff
==============================================================================
--- httpd/test/framework/trunk/c-modules/eat_post/mod_eat_post.c (original)
+++ httpd/test/framework/trunk/c-modules/eat_post/mod_eat_post.c Fri Aug 27 08:11:18 2010
@@ -31,12 +31,13 @@ static int eat_post_handler(request_rec 
     }
 
     if ((rc = ap_setup_client_block(r, REQUEST_CHUNKED_ERROR)) != OK) {
-        ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO,
-#ifdef APACHE2
-                     0,
-#endif /* APACHE2 */
-                     r->server,
+#ifdef APACHE1
+        ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, r->server,
+                     "[mod_eat_post] ap_setup_client_block failed: %d", rc);
+#else
+        ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, r->server,
                      "[mod_eat_post] ap_setup_client_block failed: %d", rc);
+#endif /* APACHE1 */
         return rc;
     }
 

Modified: httpd/test/framework/trunk/c-modules/echo_post/mod_echo_post.c
URL: http://svn.apache.org/viewvc/httpd/test/framework/trunk/c-modules/echo_post/mod_echo_post.c?rev=990065&r1=990064&r2=990065&view=diff
==============================================================================
--- httpd/test/framework/trunk/c-modules/echo_post/mod_echo_post.c (original)
+++ httpd/test/framework/trunk/c-modules/echo_post/mod_echo_post.c Fri Aug 27 08:11:18 2010
@@ -24,12 +24,13 @@ static int echo_post_handler(request_rec
     }
 
     if ((rc = ap_setup_client_block(r, REQUEST_CHUNKED_ERROR)) != OK) {
-        ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO,
-#ifdef APACHE2
-                     0,
-#endif /* APACHE2 */
-                     r->server,
+#ifdef APACHE1
+        ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, r->server,
+                     "[mod_echo_post] ap_setup_client_block failed: %d", rc);
+#else
+        ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, r->server,
                      "[mod_echo_post] ap_setup_client_block failed: %d", rc);
+#endif /* APACHE1 */
         return 0;
     }
 
@@ -42,31 +43,58 @@ static int echo_post_handler(request_rec
 #endif
     
     if (r->args) {
+#ifdef APACHE1
+        ap_rprintf(r, "%ld:", r->remaining);
+#else
         ap_rprintf(r, "%" APR_OFF_T_FMT ":", r->remaining);
+#endif /* APACHE1 */
     }
 
+#ifdef APACHE1
+    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, r,
+                  "[mod_echo_post] going to echo %ld bytes",
+                  r->remaining);
+#else
     ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
                   "[mod_echo_post] going to echo %" APR_OFF_T_FMT " bytes",
                   r->remaining);
+#endif /* APACHE1 */
 
     while ((nrd = ap_get_client_block(r, buff, sizeof(buff))) > 0) {
+#ifdef APACHE1
+        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, r,
+                      "[mod_echo_post] read %ld bytes (wanted %d, remaining=%ld)",
+                      nrd, sizeof(buff), r->remaining);
+#else
         ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
                       "[mod_echo_post] read %ld bytes (wanted %" APR_SIZE_T_FMT 
                       ", remaining=%" APR_OFF_T_FMT ")",
                       nrd, sizeof(buff), r->remaining);
+#endif /* APACHE1 */
         ap_rwrite(buff, nrd, r);
         total += nrd;
     }
 
     if (nrd < 0) {
         ap_rputs("!!!ERROR!!!", r);
+#ifdef APACHE1
+        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, r,
+                      "[mod_echo_post] ap_get_client_block got error");
+#else
         ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
                       "[mod_echo_post] ap_get_client_block got error");
+#endif /* APACHE1 */
     }
 
+#ifdef APACHE1
+    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, r,
+            "[mod_echo_post] done reading %ld bytes, %ld bytes remain",
+            total, r->remaining);
+#else
     ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
             "[mod_echo_post] done reading %ld bytes, %" APR_OFF_T_FMT " bytes remain",
             total, r->remaining);
+#endif /* APACHE1 */
     
     return OK;
 }

Modified: httpd/test/framework/trunk/c-modules/echo_post_chunk/mod_echo_post_chunk.c
URL: http://svn.apache.org/viewvc/httpd/test/framework/trunk/c-modules/echo_post_chunk/mod_echo_post_chunk.c?rev=990065&r1=990064&r2=990065&view=diff
==============================================================================
--- httpd/test/framework/trunk/c-modules/echo_post_chunk/mod_echo_post_chunk.c (original)
+++ httpd/test/framework/trunk/c-modules/echo_post_chunk/mod_echo_post_chunk.c Fri Aug 27
08:11:18 2010
@@ -25,12 +25,13 @@ static int echo_post_chunk_handler(reque
     }
 
     if ((rc = ap_setup_client_block(r, REQUEST_CHUNKED_DECHUNK)) != OK) {
-        ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO,
-#ifdef APACHE2
-                     0,
-#endif /* APACHE2 */
-                     r->server,
+#ifdef APACHE1
+        ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, r->server,
+                     "[mod_echo_post_chunk] ap_setup_client_block failed: %d", rc);
+#else
+        ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, r->server,
                      "[mod_echo_post_chunk] ap_setup_client_block failed: %d", rc);
+#endif /* APACHE1 */
         return 0;
     }
 



Mime
View raw message