Revision: 14457
Author: adrian.chadd
Date: Sun Mar 14 08:10:48 2010
Log: Move the non-logging specific stuff out of httpRequestLog() and
back into httpRequestFree().


http://code.google.com/p/lusca-cache/source/detail?r=14457

Modified:
 /branches/LUSCA_HEAD/src/client_side.c

=======================================
--- /branches/LUSCA_HEAD/src/client_side.c      Sun Mar 14 06:33:11 2010
+++ /branches/LUSCA_HEAD/src/client_side.c      Sun Mar 14 08:10:48 2010
@@ -248,6 +248,8 @@
  * I'll investigate what needs changing in a later commit
  * to be sure that the modifications in question don't
  * inadvertently break things.
+ *
+ * This function also updates the clientdb.
  */
 static void
 httpRequestLog(clientHttpRequest *http)
@@ -318,10 +320,6 @@
clientdbUpdate(conn->peer.sin_addr, http->log_type, PROTO_HTTP, http->out.size);
        }
     }
-    if (http->acl_checklist)
-       aclChecklistFree(http->acl_checklist);
-    if (request)
-       checkFailureRatio(request->err_type, http->al.hier.code);
     safe_free(http->al.headers.request);
     safe_free(http->al.headers.reply);
     safe_free(http->al.cache.authuser);
@@ -347,6 +345,12 @@

     httpRequestLog(http);

+    /* XXX accesslog struct used here outside of httpRequestLog() ! */
+    if (request)
+       checkFailureRatio(request->err_type, http->al.hier.code);
+
+    if (http->acl_checklist)
+       aclChecklistFree(http->acl_checklist);
     safe_free(http->uri);
     safe_free(http->log_uri);
     safe_free(http->redirect.location);

--
You received this message because you are subscribed to the Google Groups 
"lusca-commit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/lusca-commit?hl=en.

Reply via email to