]> granicus.if.org Git - apache/commitdiff
Merge r1226375:
authorStefan Fritsch <sf@apache.org>
Mon, 2 Jan 2012 09:02:31 +0000 (09:02 +0000)
committerStefan Fritsch <sf@apache.org>
Mon, 2 Jan 2012 09:02:31 +0000 (09:02 +0000)
Add a bit of debug logging

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1226376 13f79535-47bb-0310-9956-ffa450edef68

modules/slotmem/mod_slotmem_shm.c

index 496764c1198b860688dca4b61b4371a51dd3c792..cd6ead27e00270b69aa365948aab5a7fd4badd04 100644 (file)
@@ -24,6 +24,7 @@
 #include  "ap_slotmem.h"
 
 #include "httpd.h"
+#include "http_main.h"
 #ifdef AP_NEED_SET_MUTEX_PERMS
 #include "unixd.h"
 #endif
@@ -571,6 +572,10 @@ static apr_status_t slotmem_grab(ap_slotmem_instance_t *slot, unsigned int *id)
         }
     }
     if (i >= slot->desc.num) {
+        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf, APLOGNO(02293)
+                     "slotmem(%s) grab failed. Num %u/num_free %u",
+                     slot->name, slotmem_num_slots(slot),
+                     slotmem_num_free_slots(slot));
         return APR_EINVAL;
     }
     *inuse = 1;
@@ -591,6 +596,10 @@ static apr_status_t slotmem_release(ap_slotmem_instance_t *slot,
     inuse = slot->inuse;
 
     if (id >= slot->desc.num || !inuse[id] ) {
+        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf, APLOGNO(02294)
+                     "slotmem(%s) release failed. Num %u/inuse[%u] %d",
+                     slot->name, slotmem_num_slots(slot),
+                     id, (int)inuse[id]);
         return APR_NOTFOUND;
     }
     inuse[id] = 0;