https://bz.apache.org/bugzilla/show_bug.cgi?id=69264

--- Comment #6 from Ruediger Pluem <rpl...@apache.org> ---
Maybe the following temporary patch can help support debugging:

Index: modules/loggers/mod_log_forensic.c
===================================================================
--- modules/loggers/mod_log_forensic.c  (revision 1919740)
+++ modules/loggers/mod_log_forensic.c  (working copy)
@@ -186,6 +186,7 @@
     const char *id;
     hlog h;
     apr_status_t rv;
+    apr_size_t bw;

     if (!cfg->fd || r->prev) {
         return DECLINED;
@@ -220,7 +221,12 @@
     ap_assert(h.pos < h.end);
     *h.pos++ = '\n';

-    rv = apr_file_write_full(cfg->fd, h.log, h.count-1, NULL);
+    rv = apr_file_write_full(cfg->fd, h.log, h.count-1, &bw);
+    if (rv != APR_SUCCESS) {
+        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, rv, r,
+                     "Short write. Only wrote %" APR_SIZE_T_FMT 
+                     " instead of %" APR_SIZE_T_FMT ".", bw, h.count-1);
+    }
     ap_assert(rv == APR_SUCCESS);

     apr_table_setn(r->notes, "forensic-id", id);
@@ -237,6 +243,7 @@
     char *s;
     apr_size_t n;
     apr_status_t rv;
+    apr_size_t bw;

     if (!cfg->fd || id == NULL) {
         return DECLINED;
@@ -244,7 +251,12 @@

     s = apr_pstrcat(r->pool, "-", id, "\n", NULL);
     n = strlen(s);
-    rv = apr_file_write_full(cfg->fd, s, n, NULL);
+    rv = apr_file_write_full(cfg->fd, s, n, &bw);
+    if (rv != APR_SUCCESS) {
+        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, rv, r,
+                     "Short write. Only wrote %" APR_SIZE_T_FMT 
+                     " instead of %" APR_SIZE_T_FMT ".", bw, n);
+    }
     ap_assert(rv == APR_SUCCESS);

     return OK;

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscr...@httpd.apache.org
For additional commands, e-mail: bugs-h...@httpd.apache.org

Reply via email to