Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion doc/admin-guide/plugins/tcpinfo.en.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ The following options may be specified in :file:`plugin.config`:
Event Name Triggered when
============== ===============================================
send_resp_hdr The server begins sending an HTTP response.
ssn_close The TCP connection closes.
ssn_start A new TCP connection is accepted.
txn_close A HTTP transaction is completed.
txn_start A HTTP transaction is initiated.
Expand Down
4 changes: 0 additions & 4 deletions doc/locale/ja/LC_MESSAGES/admin-guide/plugins/tcpinfo.en.po
Original file line number Diff line number Diff line change
Expand Up @@ -232,10 +232,6 @@ msgstr ""
msgid "snd_ssthresh"
msgstr ""

#: ../../admin-guide/plugins/tcpinfo.en.rst:48
msgid "ssn_close"
msgstr ""

#: ../../admin-guide/plugins/tcpinfo.en.rst:69
#: ../../admin-guide/plugins/tcpinfo.en.rst:81
msgid "timestamp"
Expand Down
17 changes: 5 additions & 12 deletions plugins/tcpinfo/tcpinfo.cc
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
#define TCPI_HOOK_SSN_START 0x01u
#define TCPI_HOOK_TXN_START 0x02u
#define TCPI_HOOK_SEND_RESPONSE 0x04u
#define TCPI_HOOK_SSN_CLOSE 0x08u
#define TCPI_HOOK_TXN_CLOSE 0x10u

// Log format headers. These are emitted once at the start of a log file. Note that we
Expand Down Expand Up @@ -215,10 +214,6 @@ tcp_info_hook(TSCont contp, TSEvent event, void *edata)
ssnp = TSHttpTxnSsnGet(txnp);
event_name = "send_resp_hdr";
break;
case TS_EVENT_HTTP_SSN_CLOSE:
ssnp = static_cast<TSHttpSsn>(edata);
event_name = "ssn_close";
break;
default:
return 0;
}
Expand Down Expand Up @@ -291,8 +286,11 @@ parse_hook_list(const char *hook_list)
const struct hookmask {
const char *name;
unsigned mask;
} hooks[] = {{"ssn_start", TCPI_HOOK_SSN_START}, {"txn_start", TCPI_HOOK_TXN_START}, {"send_resp_hdr", TCPI_HOOK_SEND_RESPONSE},
{"ssn_close", TCPI_HOOK_SSN_CLOSE}, {"txn_close", TCPI_HOOK_TXN_CLOSE}, {nullptr, 0u}};
} hooks[] = {{"ssn_start", TCPI_HOOK_SSN_START},
{"txn_start", TCPI_HOOK_TXN_START},
{"send_resp_hdr", TCPI_HOOK_SEND_RESPONSE},
{"txn_close", TCPI_HOOK_TXN_CLOSE},
{nullptr, 0u}};

str = TSstrdup(hook_list);

Expand Down Expand Up @@ -461,11 +459,6 @@ TSPluginInit(int argc, const char *argv[])
TSDebug("tcpinfo", "added hook to the sending of the headers");
}

if (hooks & TCPI_HOOK_SSN_CLOSE) {
TSHttpHookAdd(TS_HTTP_SSN_CLOSE_HOOK, cont);
TSDebug("tcpinfo", "added hook to the close of the TCP connection");
}

if (hooks & TCPI_HOOK_TXN_CLOSE) {
TSHttpHookAdd(TS_HTTP_TXN_CLOSE_HOOK, cont);
TSDebug("tcpinfo", "added hook to the close of the transaction");
Expand Down