]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Make %<a and %<p details available to [eCAP] RESPMOD services
authorEduard Bagdasaryan <eduard.bagdasaryan@measurement-factory.com>
Mon, 25 Jan 2016 08:26:32 +0000 (21:26 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Mon, 25 Jan 2016 08:26:32 +0000 (21:26 +1300)
... via adaptation_meta.

This patch fills access log entry with server connection
details as soon as possible. Previously, ALE was updated only
in prepareLogWithRequestDetails() when adaptation process has
already finished.

src/FwdState.cc
src/FwdState.h

index 333c2b73fa877a42fb48351ef99729827e1c5e4c..3658dcce8a3be5e8e046128b65751747e03c3eb1 100644 (file)
@@ -400,7 +400,7 @@ FwdState::startConnectionOrFail()
         // Done here before anything else so the errors get logged for
         // this server link regardless of what happens when connecting to it.
         // IF sucessfuly connected this top destination will become the serverConnection().
-        request->hier.note(serverDestinations[0], request->url.host());
+        syncHierNote(serverDestinations[0], request->url.host());
         request->clearError();
 
         connectStart();
@@ -796,7 +796,14 @@ FwdState::syncWithServerConn(const char *host)
         Ip::Qos::setSockNfmark(serverConn, GetNfmarkToServer(request));
 #endif
 
-    request->hier.note(serverConn, host);
+    syncHierNote(serverConn, host);
+}
+
+void
+FwdState::syncHierNote(const Comm::ConnectionPointer &server, const char *host)
+{
+    request->hier.note(server, host);
+    al->hier.note(server, host);
 }
 
 /**
index 321b6db8683bfd37ae5ae18f4b14f9d5ee14af9a..e38cbf09d3aeeda3464eb0ef0b5e3d396d51a9d1 100644 (file)
@@ -121,6 +121,7 @@ private:
     void closeServerConnection(const char *reason);
 
     void syncWithServerConn(const char *host);
+    void syncHierNote(const Comm::ConnectionPointer &server, const char *host);
 
 public:
     StoreEntry *entry;