Skip to content

Commit

Permalink
Make %<a and %<p details available to [eCAP] RESPMOD services
Browse files Browse the repository at this point in the history
... 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.
  • Loading branch information
eduard-bagdasaryan authored and yadij committed Jan 25, 2016
1 parent 297a276 commit 7d1dac7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/FwdState.cc
Expand Up @@ -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();
Expand Down Expand Up @@ -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);
}

/**
Expand Down
1 change: 1 addition & 0 deletions src/FwdState.h
Expand Up @@ -121,6 +121,7 @@ class FwdState : public RefCountable
void closeServerConnection(const char *reason);

void syncWithServerConn(const char *host);
void syncHierNote(const Comm::ConnectionPointer &server, const char *host);

public:
StoreEntry *entry;
Expand Down

0 comments on commit 7d1dac7

Please sign in to comment.