This is an automated email from the ASF dual-hosted git repository. jpeach pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push: new edc425d Remove ending period from error messages. edc425d is described below commit edc425dbad1380e0af2dc3346c5df23b111a0112 Author: James Peach <jpe...@apache.org> AuthorDate: Sun May 14 12:45:23 2017 -0700 Remove ending period from error messages. Standardize error messages by removing the terminating period. --- .../api/functions/TSPluginInit.en.rst | 2 +- .../api/functions/TSTrafficServerVersionGet.en.rst | 2 +- example/add_header/add_header.c | 2 +- example/append_transform/append_transform.c | 2 +- example/basic_auth/basic_auth.c | 2 +- example/blacklist_0/blacklist_0.c | 2 +- example/blacklist_1/blacklist_1.c | 2 +- example/bnull_transform/bnull_transform.c | 2 +- example/cache_scan/cache_scan.cc | 2 +- example/disable_http2/disable_http2.cc | 4 +- example/file_1/file_1.c | 2 +- example/hello/hello.c | 2 +- example/lifecycle_plugin/lifecycle_plugin.c | 4 +- example/null_transform/null_transform.c | 4 +- example/output_header/output_header.c | 2 +- example/protocol/Protocol.c | 6 +-- example/protocol_stack/protocol_stack.cc | 2 +- example/redirect_1/redirect_1.c | 4 +- example/remap_header_add/remap_header_add.cc | 4 +- example/replace_header/replace_header.c | 4 +- example/response_header_1/response_header_1.c | 2 +- example/server-push/server-push.c | 2 +- example/server-transform/server-transform.c | 6 +-- example/ssl-preaccept/ssl-preaccept.cc | 8 +-- example/ssl-sni-whitelist/ssl-sni-whitelist.cc | 10 ++-- example/ssl-sni/ssl-sni.cc | 10 ++-- example/thread-1/thread-1.c | 2 +- example/thread-pool/psi.c | 4 +- lib/cppapi/Plugin.cc | 2 +- plugins/background_fetch/background_fetch.cc | 6 +-- plugins/esi/combo_handler.cc | 10 ++-- plugins/esi/esi.cc | 18 +++---- plugins/experimental/acme/acme.c | 2 +- .../experimental/ats_pagespeed/ats_pagespeed.cc | 2 +- .../experimental/buffer_upload/buffer_upload.cc | 14 +++--- .../experimental/cache_key_genid/cache_key_genid.c | 2 +- .../collapsed_forwarding/collapsed_forwarding.cc | 2 +- .../custom_redirect/custom_redirect.cc | 4 +- .../memcached_remap/memcached_remap.cc | 2 +- plugins/experimental/mysql_remap/mysql_remap.cc | 2 +- plugins/experimental/remap_stats/remap_stats.c | 4 +- .../ssl_cert_loader/ssl-cert-loader.cc | 12 ++--- .../stale_while_revalidate.c | 6 +-- .../experimental/stream_editor/stream_editor.cc | 2 +- plugins/experimental/ts_lua/ts_lua.c | 2 +- plugins/experimental/ts_lua/ts_lua_package.c | 20 ++++---- plugins/experimental/url_sig/url_sig.c | 57 +++++++++++----------- plugins/header_rewrite/header_rewrite.cc | 2 +- plugins/header_rewrite/parser.cc | 4 +- plugins/healthchecks/healthchecks.c | 4 +- plugins/regex_revalidate/regex_revalidate.c | 10 ++-- plugins/tcpinfo/tcpinfo.cc | 8 +-- 52 files changed, 148 insertions(+), 149 deletions(-) diff --git a/doc/developer-guide/api/functions/TSPluginInit.en.rst b/doc/developer-guide/api/functions/TSPluginInit.en.rst index 94ac644..232bb79 100644 --- a/doc/developer-guide/api/functions/TSPluginInit.en.rst +++ b/doc/developer-guide/api/functions/TSPluginInit.en.rst @@ -71,7 +71,7 @@ Examples info.support_email = "ts-api-supp...@mycompany.com"; if (TSPluginRegister(&info) != TS_SUCCESS) { - TSError("[%s] Plugin registration failed.", PLUGIN_NAME); + TSError("[%s] Plugin registration failed", PLUGIN_NAME); } } diff --git a/doc/developer-guide/api/functions/TSTrafficServerVersionGet.en.rst b/doc/developer-guide/api/functions/TSTrafficServerVersionGet.en.rst index a0d20a6..076ab1e 100644 --- a/doc/developer-guide/api/functions/TSTrafficServerVersionGet.en.rst +++ b/doc/developer-guide/api/functions/TSTrafficServerVersionGet.en.rst @@ -88,7 +88,7 @@ Example info.support_email = "ts-api-supp...@mycompany.com"; if (TSPluginRegister(&info) != TS_SUCCESS) { - TSError("[%s] Plugin registration failed.", PLUGIN_NAME); + TSError("[%s] Plugin registration failed", PLUGIN_NAME); } if (!check_ts_version()) { diff --git a/example/add_header/add_header.c b/example/add_header/add_header.c index a114c79..ebd6a24 100644 --- a/example/add_header/add_header.c +++ b/example/add_header/add_header.c @@ -133,7 +133,7 @@ TSPluginInit(int argc, const char *argv[]) info.support_email = "d...@trafficserver.apache.org"; if (TSPluginRegister(&info) != TS_SUCCESS) { - TSError("[%s] Plugin registration failed.", PLUGIN_NAME); + TSError("[%s] Plugin registration failed", PLUGIN_NAME); goto error; } diff --git a/example/append_transform/append_transform.c b/example/append_transform/append_transform.c index 7b244c6..67922f2 100644 --- a/example/append_transform/append_transform.c +++ b/example/append_transform/append_transform.c @@ -356,7 +356,7 @@ TSPluginInit(int argc, const char *argv[]) info.support_email = "d...@trafficserver.apache.org"; if (TSPluginRegister(&info) != TS_SUCCESS) { - TSError("[%s] Plugin registration failed.", PLUGIN_NAME); + TSError("[%s] Plugin registration failed", PLUGIN_NAME); goto Lerror; } diff --git a/example/basic_auth/basic_auth.c b/example/basic_auth/basic_auth.c index 8c16ac3..1743465 100644 --- a/example/basic_auth/basic_auth.c +++ b/example/basic_auth/basic_auth.c @@ -220,7 +220,7 @@ TSPluginInit(int argc ATS_UNUSED, const char *argv[] ATS_UNUSED) info.support_email = "d...@trafficserver.apache.org"; if (TSPluginRegister(&info) != TS_SUCCESS) { - TSError("[%s] Plugin registration failed.", PLUGIN_NAME); + TSError("[%s] Plugin registration failed", PLUGIN_NAME); } /* Build translation table */ diff --git a/example/blacklist_0/blacklist_0.c b/example/blacklist_0/blacklist_0.c index 432bdfd..aa86c25 100644 --- a/example/blacklist_0/blacklist_0.c +++ b/example/blacklist_0/blacklist_0.c @@ -158,7 +158,7 @@ TSPluginInit(int argc, const char *argv[]) info.support_email = "d...@trafficserver.apache.org"; if (TSPluginRegister(&info) != TS_SUCCESS) { - TSError("[%s] Plugin registration failed.", PLUGIN_NAME); + TSError("[%s] Plugin registration failed", PLUGIN_NAME); } nsites = argc - 1; diff --git a/example/blacklist_1/blacklist_1.c b/example/blacklist_1/blacklist_1.c index a664173..b6c7efd 100644 --- a/example/blacklist_1/blacklist_1.c +++ b/example/blacklist_1/blacklist_1.c @@ -316,7 +316,7 @@ TSPluginInit(int argc ATS_UNUSED, const char *argv[] ATS_UNUSED) info.support_email = "d...@trafficserver.apache.org"; if (TSPluginRegister(&info) != TS_SUCCESS) { - TSError("[%s] Plugin registration failed.", PLUGIN_NAME); + TSError("[%s] Plugin registration failed", PLUGIN_NAME); } /* create an TSTextLogObject to log blacklisted requests to */ diff --git a/example/bnull_transform/bnull_transform.c b/example/bnull_transform/bnull_transform.c index 589aa55..97ed3ba 100644 --- a/example/bnull_transform/bnull_transform.c +++ b/example/bnull_transform/bnull_transform.c @@ -310,7 +310,7 @@ TSPluginInit(int argc ATS_UNUSED, const char *argv[] ATS_UNUSED) info.support_email = "d...@trafficserver.apache.org"; if (TSPluginRegister(&info) != TS_SUCCESS) { - TSError("[%s] Plugin registration failed.", PLUGIN_NAME); + TSError("[%s] Plugin registration failed", PLUGIN_NAME); goto Lerror; } diff --git a/example/cache_scan/cache_scan.cc b/example/cache_scan/cache_scan.cc index 22f457a..cd73dd5 100644 --- a/example/cache_scan/cache_scan.cc +++ b/example/cache_scan/cache_scan.cc @@ -504,6 +504,6 @@ TSPluginInit(int /* argc ATS_UNUSED */, const char * /* argv ATS_UNUSED */ []) global_contp = TSContCreate(cache_print_plugin, TSMutexCreate()); TSHttpHookAdd(TS_HTTP_READ_REQUEST_HDR_HOOK, global_contp); } else { - TSError("[%s] Plugin registration failed.", PLUGIN_NAME); + TSError("[%s] Plugin registration failed", PLUGIN_NAME); } } diff --git a/example/disable_http2/disable_http2.cc b/example/disable_http2/disable_http2.cc index 36a94d0..18b2637 100644 --- a/example/disable_http2/disable_http2.cc +++ b/example/disable_http2/disable_http2.cc @@ -95,13 +95,13 @@ TSPluginInit(int argc, char const *argv[]) ret = TSPluginRegister(&info); if (ret != TS_SUCCESS) { - TSError("[%s] registration failed.", PLUGIN_NAME); + TSError("[%s] registration failed", PLUGIN_NAME); return; } else if (argc < 2) { TSError("[%s] Usage %s.so servername1 servername2 ... ", PLUGIN_NAME, PLUGIN_NAME); return; } else { - TSDebug(PLUGIN_NAME, "registration succeeded."); + TSDebug(PLUGIN_NAME, "registration succeeded"); } for (int i = 1; i < argc; i++) { diff --git a/example/file_1/file_1.c b/example/file_1/file_1.c index 30eff6f..21ee940 100644 --- a/example/file_1/file_1.c +++ b/example/file_1/file_1.c @@ -51,7 +51,7 @@ TSPluginInit(int argc, const char *argv[]) info.support_email = "d...@trafficserver.apache.org"; if (TSPluginRegister(&info) != TS_SUCCESS) { - TSError("[%s] Plugin registration failed.", PLUGIN_NAME); + TSError("[%s] Plugin registration failed", PLUGIN_NAME); } for (i = 1; i < argc; i++) { diff --git a/example/hello/hello.c b/example/hello/hello.c index 34df0f7..9f4c6cb 100644 --- a/example/hello/hello.c +++ b/example/hello/hello.c @@ -37,7 +37,7 @@ TSPluginInit(int argc, const char *argv[]) info.support_email = "d...@trafficserver.apache.org"; if (TSPluginRegister(&info) != TS_SUCCESS) { - TSError("[%s] Plugin registration failed.", PLUGIN_NAME); + TSError("[%s] Plugin registration failed", PLUGIN_NAME); } TSDebug(PLUGIN_NAME, "Hello World!"); diff --git a/example/lifecycle_plugin/lifecycle_plugin.c b/example/lifecycle_plugin/lifecycle_plugin.c index a84e213..19879c8 100644 --- a/example/lifecycle_plugin/lifecycle_plugin.c +++ b/example/lifecycle_plugin/lifecycle_plugin.c @@ -69,7 +69,7 @@ TSPluginInit(int argc, const char *argv[]) info.support_email = "d...@trafficserver.apache.org"; if (TSPluginRegister(&info) != TS_SUCCESS) { - TSError("[%s] Plugin registration failed.", PLUGIN_NAME); + TSError("[%s] Plugin registration failed", PLUGIN_NAME); goto Lerror; } @@ -86,5 +86,5 @@ TSPluginInit(int argc, const char *argv[]) return; Lerror: - TSError("[%s] Unable to initialize plugin (disabled).", PLUGIN_NAME); + TSError("[%s] Unable to initialize plugin (disabled)", PLUGIN_NAME); } diff --git a/example/null_transform/null_transform.c b/example/null_transform/null_transform.c index cf60424..cc941cd 100644 --- a/example/null_transform/null_transform.c +++ b/example/null_transform/null_transform.c @@ -317,7 +317,7 @@ TSPluginInit(int argc ATS_UNUSED, const char *argv[] ATS_UNUSED) info.support_email = "d...@trafficserver.apache.org"; if (TSPluginRegister(&info) != TS_SUCCESS) { - TSError("[%s] Plugin registration failed.", PLUGIN_NAME); + TSError("[%s] Plugin registration failed", PLUGIN_NAME); goto Lerror; } @@ -326,5 +326,5 @@ TSPluginInit(int argc ATS_UNUSED, const char *argv[] ATS_UNUSED) return; Lerror: - TSError("[%s] Unable to initialize plugin (disabled).", PLUGIN_NAME); + TSError("[%s] Unable to initialize plugin (disabled)", PLUGIN_NAME); } diff --git a/example/output_header/output_header.c b/example/output_header/output_header.c index 978c7a4..11bf84d 100644 --- a/example/output_header/output_header.c +++ b/example/output_header/output_header.c @@ -158,7 +158,7 @@ TSPluginInit(int argc ATS_UNUSED, const char *argv[] ATS_UNUSED) info.support_email = "d...@trafficserver.apache.org"; if (TSPluginRegister(&info) != TS_SUCCESS) { - TSError("[%s] Plugin registration failed.", PLUGIN_NAME); + TSError("[%s] Plugin registration failed", PLUGIN_NAME); goto error; } diff --git a/example/protocol/Protocol.c b/example/protocol/Protocol.c index e6f4cd0..3e85e86 100644 --- a/example/protocol/Protocol.c +++ b/example/protocol/Protocol.c @@ -112,7 +112,7 @@ TSPluginInit(int argc, const char *argv[]) info.support_email = "d...@trafficserver.apache.org"; if (TSPluginRegister(&info) != TS_SUCCESS) { - TSError("[%s] Plugin registration failed.", PLUGIN_NAME); + TSError("[%s] Plugin registration failed", PLUGIN_NAME); goto error; } @@ -130,7 +130,7 @@ TSPluginInit(int argc, const char *argv[]) accept_port = tmp; TSDebug(PLUGIN_NAME, "using accept_port %d", accept_port); } else { - TSError("[%s] Wrong argument for accept_port, using default port %d.", PLUGIN_NAME, accept_port); + TSError("[%s] Wrong argument for accept_port, using default port %d", PLUGIN_NAME, accept_port); } tmp = strtol(argv[2], &end, 10); @@ -138,7 +138,7 @@ TSPluginInit(int argc, const char *argv[]) server_port = tmp; TSDebug(PLUGIN_NAME, "using server_port %d", server_port); } else { - TSError("[%s] Wrong argument for server_port, using default port %d.", PLUGIN_NAME, server_port); + TSError("[%s] Wrong argument for server_port, using default port %d", PLUGIN_NAME, server_port); } } diff --git a/example/protocol_stack/protocol_stack.cc b/example/protocol_stack/protocol_stack.cc index eb2b427..24fa686 100644 --- a/example/protocol_stack/protocol_stack.cc +++ b/example/protocol_stack/protocol_stack.cc @@ -55,7 +55,7 @@ TSPluginInit(int argc ATS_UNUSED, const char *argv[] ATS_UNUSED) info.support_email = "d...@trafficserver.apache.org"; if (TSPluginRegister(&info) != TS_SUCCESS) { - TSError("[%s] Plugin registration failed.", PLUGIN_NAME); + TSError("[%s] Plugin registration failed", PLUGIN_NAME); } TSHttpHookAdd(TS_HTTP_READ_REQUEST_HDR_HOOK, TSContCreate(proto_stack_cb, nullptr)); diff --git a/example/redirect_1/redirect_1.c b/example/redirect_1/redirect_1.c index c7b4450..494e397 100644 --- a/example/redirect_1/redirect_1.c +++ b/example/redirect_1/redirect_1.c @@ -294,7 +294,7 @@ TSPluginInit(int argc, const char *argv[]) info.support_email = "d...@trafficserver.apache.org"; if (TSPluginRegister(&info) != TS_SUCCESS) { - TSError("[%s] Plugin registration failed.", PLUGIN_NAME); + TSError("[%s] Plugin registration failed", PLUGIN_NAME); } if (argc == 3) { @@ -317,7 +317,7 @@ TSPluginInit(int argc, const char *argv[]) ip_deny = inet_addr(block_ip); - TSDebug(PLUGIN_NAME, "initializing stats..."); + TSDebug(PLUGIN_NAME, "initializing stats"); init_stats(); TSHttpHookAdd(TS_HTTP_READ_REQUEST_HDR_HOOK, TSContCreate(redirect_plugin, NULL)); diff --git a/example/remap_header_add/remap_header_add.cc b/example/remap_header_add/remap_header_add.cc index 417fcfa..d115291 100644 --- a/example/remap_header_add/remap_header_add.cc +++ b/example/remap_header_add/remap_header_add.cc @@ -92,7 +92,7 @@ TSRemapNewInstance(int argc, char *argv[], void **ih, char *, int) TSDebug(PLUGIN_NAME, "TSRemapNewInstance()"); if (!argv || !ih) { - TSError("[%s] Unable to load plugin because missing argv or ih.", PLUGIN_NAME); + TSError("[%s] Unable to load plugin because missing argv or ih", PLUGIN_NAME); return TS_ERROR; } @@ -141,7 +141,7 @@ TSRemapDoRemap(void *ih, TSHttpTxn txn, TSRemapRequestInfo *rri) remap_line *rl = static_cast<remap_line *>(ih); if (!rl || !rri) { - TSError("[%s] rl or rri is null.", PLUGIN_NAME); + TSError("[%s] rl or rri is null", PLUGIN_NAME); return TSREMAP_NO_REMAP; } diff --git a/example/replace_header/replace_header.c b/example/replace_header/replace_header.c index e3353c8..f69116b 100644 --- a/example/replace_header/replace_header.c +++ b/example/replace_header/replace_header.c @@ -49,7 +49,7 @@ replace_header(TSHttpTxn txnp) TSMLoc field_loc; if (TSHttpTxnServerRespGet(txnp, &resp_bufp, &resp_loc) != TS_SUCCESS) { - TSError("[%s] Couldn't retrieve server response header.", PLUGIN_NAME); + TSError("[%s] Couldn't retrieve server response header", PLUGIN_NAME); goto done; } @@ -105,7 +105,7 @@ TSPluginInit(int argc ATS_UNUSED, const char *argv[] ATS_UNUSED) info.support_email = "d...@trafficserver.apache.org"; if (TSPluginRegister(&info) != TS_SUCCESS) { - TSError("[%s] Plugin registration failed.", PLUGIN_NAME); + TSError("[%s] Plugin registration failed", PLUGIN_NAME); } TSHttpHookAdd(TS_HTTP_READ_RESPONSE_HDR_HOOK, TSContCreate(replace_header_plugin, NULL)); diff --git a/example/response_header_1/response_header_1.c b/example/response_header_1/response_header_1.c index 583a7cd..c5066fb 100644 --- a/example/response_header_1/response_header_1.c +++ b/example/response_header_1/response_header_1.c @@ -228,7 +228,7 @@ TSPluginInit(int argc, const char *argv[]) info.support_email = "d...@trafficserver.apache.org"; if (TSPluginRegister(&info) != TS_SUCCESS) { - TSError("[%s] Plugin registration failed.", PLUGIN_NAME); + TSError("[%s] Plugin registration failed", PLUGIN_NAME); } init_buffer_status = 0; diff --git a/example/server-push/server-push.c b/example/server-push/server-push.c index da256e1..724599d 100644 --- a/example/server-push/server-push.c +++ b/example/server-push/server-push.c @@ -105,7 +105,7 @@ TSPluginInit(int argc ATS_UNUSED, const char *argv[] ATS_UNUSED) info.support_email = "ts-api-supp...@mycompany.com"; if (TSPluginRegister(&info) != TS_SUCCESS) { - TSError("[%s] Plugin registration failed.", PLUGIN_NAME); + TSError("[%s] Plugin registration failed", PLUGIN_NAME); } TSstrlcpy(url, argv[1], sizeof(url)); diff --git a/example/server-transform/server-transform.c b/example/server-transform/server-transform.c index 7a7af00..ac91787 100644 --- a/example/server-transform/server-transform.c +++ b/example/server-transform/server-transform.c @@ -193,7 +193,7 @@ transform_connect(TSCont contp, TransformData *data) ip_addr.sin_family = AF_INET; ip_addr.sin_addr.s_addr = server_ip; /* Should be in network byte order */ ip_addr.sin_port = server_port; - TSDebug("strans", "net connect.."); + TSDebug("strans", "net connect."); action = TSNetConnect(contp, (struct sockaddr const *)&ip_addr); if (!TSActionDone(action)) { @@ -519,7 +519,7 @@ transform_handler(TSCont contp, TSEvent event, void *edata) data = (TransformData *)TSContDataGet(contp); if (data == NULL) { - TSError("[server_transform] Didn't get Continuation's Data. Ignoring Event.."); + TSError("[server_transform] Didn't get Continuation's Data, ignoring event"); return 0; } TSDebug("strans", "transform handler event [%d], data->state = [%d]", event, data->state); @@ -647,7 +647,7 @@ TSPluginInit(int argc ATS_UNUSED, const char *argv[] ATS_UNUSED) info.support_email = "ts-api-supp...@mycompany.com"; if (TSPluginRegister(&info) != TS_SUCCESS) { - TSError("[server_transform] Plugin registration failed."); + TSError("[server_transform] Plugin registration failed"); } /* connect to the echo port on localhost */ diff --git a/example/ssl-preaccept/ssl-preaccept.cc b/example/ssl-preaccept/ssl-preaccept.cc index 91435a4..3fa703f 100644 --- a/example/ssl-preaccept/ssl-preaccept.cc +++ b/example/ssl-preaccept/ssl-preaccept.cc @@ -184,13 +184,13 @@ TSPluginInit(int argc, const char *argv[]) } if (TS_SUCCESS != TSPluginRegister(&info)) { - TSError(PCP "registration failed."); + TSError(PCP "registration failed"); } else if (TSTrafficServerVersionGetMajor() < 2) { - TSError(PCP "requires Traffic Server 2.0 or later."); + TSError(PCP "requires Traffic Server 2.0 or later"); } else if (0 > Load_Configuration()) { - TSError(PCP "Failed to load config file."); + TSError(PCP "Failed to load config file"); } else if (nullptr == (cb_pa = TSContCreate(&CB_Pre_Accept, TSMutexCreate()))) { - TSError(PCP "Failed to pre-accept callback."); + TSError(PCP "Failed to pre-accept callback"); } else { TSHttpHookAdd(TS_VCONN_PRE_ACCEPT_HOOK, cb_pa); success = true; diff --git a/example/ssl-sni-whitelist/ssl-sni-whitelist.cc b/example/ssl-sni-whitelist/ssl-sni-whitelist.cc index 65e0a2b..c4dd585 100644 --- a/example/ssl-sni-whitelist/ssl-sni-whitelist.cc +++ b/example/ssl-sni-whitelist/ssl-sni-whitelist.cc @@ -133,13 +133,13 @@ TSPluginInit(int argc, const char *argv[]) } if (TS_SUCCESS != TSPluginRegister(&info)) { - TSError(PCP "registration failed."); + TSError(PCP "registration failed"); } else if (TSTrafficServerVersionGetMajor() < 2) { - TSError(PCP "requires Traffic Server 2.0 or later."); + TSError(PCP "requires Traffic Server 2.0 or later"); } else if (0 > Load_Configuration()) { - TSError(PCP "Failed to load config file."); + TSError(PCP "Failed to load config file"); } else if (nullptr == (cb_sni = TSContCreate(&CB_servername_whitelist, TSMutexCreate()))) { - TSError(PCP "Failed to create SNI callback."); + TSError(PCP "Failed to create SNI callback"); } else { TSHttpHookAdd(TS_SSL_CERT_HOOK, cb_sni); success = true; @@ -158,7 +158,7 @@ TSPluginInit(int argc, const char *argv[]) void TSPluginInit(int, const char *[]) { - TSError(PCP "requires TLS SNI which is not available."); + TSError(PCP "requires TLS SNI which is not available"); } #endif // TS_USE_TLS_SNI diff --git a/example/ssl-sni/ssl-sni.cc b/example/ssl-sni/ssl-sni.cc index 9c0cca4..110f861 100644 --- a/example/ssl-sni/ssl-sni.cc +++ b/example/ssl-sni/ssl-sni.cc @@ -154,13 +154,13 @@ TSPluginInit(int argc, const char *argv[]) } if (TS_SUCCESS != TSPluginRegister(&info)) { - TSError(PCP "registration failed."); + TSError(PCP "registration failed"); } else if (TSTrafficServerVersionGetMajor() < 2) { - TSError(PCP "requires Traffic Server 2.0 or later."); + TSError(PCP "requires Traffic Server 2.0 or later"); } else if (0 > Load_Configuration()) { - TSError(PCP "Failed to load config file."); + TSError(PCP "Failed to load config file"); } else if (nullptr == (cb_cert = TSContCreate(&CB_servername, TSMutexCreate()))) { - TSError(PCP "Failed to create cert callback."); + TSError(PCP "Failed to create cert callback"); } else { TSHttpHookAdd(TS_SSL_CERT_HOOK, cb_cert); success = true; @@ -179,7 +179,7 @@ TSPluginInit(int argc, const char *argv[]) void TSPluginInit(int, const char *[]) { - TSError(PCP "requires TLS SNI which is not available."); + TSError(PCP "requires TLS SNI which is not available"); } #endif // TS_USE_TLS_SNI diff --git a/example/thread-1/thread-1.c b/example/thread-1/thread-1.c index ff6daa7..28ea799 100644 --- a/example/thread-1/thread-1.c +++ b/example/thread-1/thread-1.c @@ -74,7 +74,7 @@ TSPluginInit(int argc ATS_UNUSED, const char *argv[] ATS_UNUSED) info.support_email = "ts-api-supp...@mycompany.com"; if (TSPluginRegister(&info) != TS_SUCCESS) { - TSError("[thread-1] Plugin registration failed."); + TSError("[thread-1] Plugin registration failed"); } TSHttpHookAdd(TS_HTTP_OS_DNS_HOOK, TSContCreate(thread_plugin, NULL)); diff --git a/example/thread-pool/psi.c b/example/thread-pool/psi.c index 9702597..02bc801 100644 --- a/example/thread-pool/psi.c +++ b/example/thread-pool/psi.c @@ -664,7 +664,7 @@ handle_transform(TSCont contp) Job *new_job; /* Add a request to include a file into the jobs queue.. */ /* We'll be called back once it's done with an EVENT_IMMEDIATE */ - TSDebug(DBG_TAG, "Psi filename extracted. Adding an include job to thread queue."); + TSDebug(DBG_TAG, "Psi filename extracted, adding an include job to thread queue"); data->state = STATE_READ_PSI; /* Create a new job request and add it to the queue */ @@ -982,7 +982,7 @@ TSPluginInit(int argc ATS_UNUSED, const char *argv[] ATS_UNUSED) info.support_email = ""; if (TSPluginRegister(&info) != TS_SUCCESS) { - TSError("[psi] Plugin registration failed."); + TSError("[psi] Plugin registration failed"); } /* Initialize the psi directory = <plugin_path>/include */ diff --git a/lib/cppapi/Plugin.cc b/lib/cppapi/Plugin.cc index 766f9ad..a7d2514 100644 --- a/lib/cppapi/Plugin.cc +++ b/lib/cppapi/Plugin.cc @@ -36,5 +36,5 @@ atscppapi::RegisterGlobalPlugin(const char *name, const char *vendor, const char info.vendor_name = vendor; info.support_email = email; if (TSPluginRegister(&info) != TS_SUCCESS) - TSError("[Plugin.cc] Plugin registration failed."); + TSError("[Plugin.cc] Plugin registration failed"); } diff --git a/plugins/background_fetch/background_fetch.cc b/plugins/background_fetch/background_fetch.cc index 7103c69..1e4a299 100644 --- a/plugins/background_fetch/background_fetch.cc +++ b/plugins/background_fetch/background_fetch.cc @@ -560,7 +560,7 @@ TSPluginInit(int argc, const char *argv[]) info.support_email = (char *)"d...@trafficserver.apache.org"; if (TS_SUCCESS != TSPluginRegister(&info)) { - TSError("[%s] Plugin registration failed.", PLUGIN_NAME); + TSError("[%s] Plugin registration failed", PLUGIN_NAME); } TSCont cont = TSContCreate(cont_handle_response, nullptr); @@ -576,7 +576,7 @@ TSPluginInit(int argc, const char *argv[]) BgFetchState::getInstance().createLog(optarg); break; case 'c': - TSDebug(PLUGIN_NAME, "config file %s..", optarg); + TSDebug(PLUGIN_NAME, "config file '%s'", optarg); gConfig->readConfig(optarg); break; } @@ -667,7 +667,7 @@ TSRemapDoRemap(void *ih, TSHttpTxn txnp, TSRemapRequestInfo * /* rri */) TSHttpTxnHookAdd(txnp, TS_HTTP_READ_RESPONSE_HDR_HOOK, config->getCont()); TSHttpTxnHookAdd(txnp, TS_HTTP_TXN_CLOSE_HOOK, config->getCont()); - TSDebug(PLUGIN_NAME, "background fetch TSRemapDoRemap..."); + TSDebug(PLUGIN_NAME, "background fetch TSRemapDoRemap"); TSHandleMLocRelease(bufp, req_hdrs, field_loc); } TSHandleMLocRelease(bufp, TS_NULL_MLOC, req_hdrs); diff --git a/plugins/esi/combo_handler.cc b/plugins/esi/combo_handler.cc index 8bf398d..1e22a43 100644 --- a/plugins/esi/combo_handler.cc +++ b/plugins/esi/combo_handler.cc @@ -318,7 +318,7 @@ TSPluginInit(int argc, const char *argv[]) info.support_email = "d...@trafficserver.apache.org"; if (TSPluginRegister(&info) != TS_SUCCESS) { - TSError("[combo_handler][%s] plugin registration failed.", __FUNCTION__); + TSError("[combo_handler][%s] plugin registration failed", __FUNCTION__); return; } @@ -403,7 +403,7 @@ handleReadRequestHeader(TSCont /* contp ATS_UNUSED */, TSEvent event, void *edat } LOG_DEBUG("combo is enabled for this channel"); - LOG_DEBUG("handling TS_EVENT_HTTP_OS_DNS event..."); + LOG_DEBUG("handling TS_EVENT_HTTP_OS_DNS event"); TSEvent reenable_to_event = TS_EVENT_HTTP_CONTINUE; TSMBuffer bufp; @@ -484,7 +484,7 @@ getDefaultBucket(TSHttpTxn /* txnp ATS_UNUSED */, TSMBuffer bufp, TSMLoc hdr_obj field_loc = TSMimeHdrFieldFind(bufp, hdr_obj, TS_MIME_FIELD_HOST, -1); if (field_loc == TS_NULL_MLOC) { - LOG_ERROR("Host field not found."); + LOG_ERROR("Host field not found"); return false; } @@ -577,7 +577,7 @@ parseQueryParameters(const char *query, int query_len, ClientRequest &creq) LOG_DEBUG("Signature [%.*s] on query [%.*s] is invalid", param_len - 4, param + 4, param_start_pos, query); } } else { - LOG_DEBUG("Verification not configured; ignoring signature..."); + LOG_DEBUG("Verification not configured, ignoring signature"); } break; // nothing useful after the signature } @@ -751,7 +751,7 @@ handleServerEvent(TSCont contp, TSEvent event, void *edata) } if (int_data->read_complete && int_data->write_complete) { - LOG_DEBUG("Completed request processing. Shutting down..."); + LOG_DEBUG("Completed request processing, shutting down"); delete int_data; TSContDestroy(contp); } diff --git a/plugins/esi/esi.cc b/plugins/esi/esi.cc index ce085c2..5dbbb22 100644 --- a/plugins/esi/esi.cc +++ b/plugins/esi/esi.cc @@ -711,7 +711,7 @@ transformData(TSCont contp) } } if (process_input_complete) { - TSDebug(cont_data->debug_tag, "[%s] Completed reading input...", __FUNCTION__); + TSDebug(cont_data->debug_tag, "[%s] Completed reading input", __FUNCTION__); if (cont_data->input_type == DATA_TYPE_PACKED_ESI) { TSDebug(DEBUG_TAG, "[%s] Going to use packed node list of size %d", __FUNCTION__, (int)cont_data->packed_node_list.size()); if (cont_data->esi_proc->usePackedNodeList(cont_data->packed_node_list) == EsiProcessor::UNPACK_FAILURE) { @@ -919,7 +919,7 @@ transformHandler(TSCont contp, TSEvent event, void *edata) is_fetch_event = cont_data->data_fetcher->isFetchEvent(event); if (cont_data->xform_closed) { - TSDebug(cont_debug_tag, "[%s] Transformation closed. Post-processing...", __FUNCTION__); + TSDebug(cont_debug_tag, "[%s] Transformation closed, post-processing", __FUNCTION__); if (cont_data->curr_state == ContData::PROCESSING_COMPLETE) { TSDebug(cont_debug_tag, "[%s] Processing is complete, not processing current event %d", __FUNCTION__, event); process_event = false; @@ -975,13 +975,13 @@ transformHandler(TSCont contp, TSEvent event, void *edata) break; case TS_EVENT_IMMEDIATE: - TSDebug(cont_debug_tag, "[%s] handling TS_EVENT_IMMEDIATE...", __FUNCTION__); + TSDebug(cont_debug_tag, "[%s] handling TS_EVENT_IMMEDIATE", __FUNCTION__); transformData(contp); break; default: if (is_fetch_event) { - TSDebug(cont_debug_tag, "[%s] Handling fetch event %d...", __FUNCTION__, event); + TSDebug(cont_debug_tag, "[%s] Handling fetch event %d", __FUNCTION__, event); if (cont_data->data_fetcher->handleFetchEvent(event, edata)) { if ((cont_data->curr_state == ContData::FETCHING_DATA) || (cont_data->curr_state == ContData::READING_ESI_DOC)) { // there's a small chance that fetcher is ready even before @@ -1020,7 +1020,7 @@ transformHandler(TSCont contp, TSEvent event, void *edata) return 1; lShutdown: - TSDebug(cont_data->debug_tag, "[%s] transformation closed; cleaning up data...", __FUNCTION__); + TSDebug(cont_data->debug_tag, "[%s] transformation closed; cleaning up data", __FUNCTION__); delete cont_data; TSContDestroy(contp); return 1; @@ -1504,7 +1504,7 @@ globalHookHandler(TSCont contp, TSEvent event, void *edata) switch (event) { case TS_EVENT_HTTP_READ_REQUEST_HDR: - TSDebug(DEBUG_TAG, "[%s] handling read request header event...", __FUNCTION__); + TSDebug(DEBUG_TAG, "[%s] handling read request header event", __FUNCTION__); if (intercept_req) { if (!setupServerIntercept(txnp)) { TSError("[esi][%s] Could not setup server intercept", __FUNCTION__); @@ -1521,7 +1521,7 @@ globalHookHandler(TSCont contp, TSEvent event, void *edata) if (!intercept_req) { if (event == TS_EVENT_HTTP_READ_RESPONSE_HDR) { bool mask_cache_headers = false; - TSDebug(DEBUG_TAG, "[%s] handling read response header event...", __FUNCTION__); + TSDebug(DEBUG_TAG, "[%s] handling read response header event", __FUNCTION__); if (isCacheObjTransformable(txnp, &intercept_header, &head_only)) { // transformable cache object will definitely have a // transformation already as cache_lookup_complete would @@ -1540,7 +1540,7 @@ globalHookHandler(TSCont contp, TSEvent event, void *edata) maskOsCacheHeaders(txnp); } } else { - TSDebug(DEBUG_TAG, "[%s] handling cache lookup complete event...", __FUNCTION__); + TSDebug(DEBUG_TAG, "[%s] handling cache lookup complete event", __FUNCTION__); if (isCacheObjTransformable(txnp, &intercept_header, &head_only)) { // we make the assumption above that a transformable cache // object would already have a tranformation. We should revisit @@ -1666,7 +1666,7 @@ TSPluginInit(int argc, const char *argv[]) info.support_email = (char *)"d...@trafficserver.apache.org"; if (TSPluginRegister(&info) != TS_SUCCESS) { - TSError("[esi][%s] plugin registration failed.", __FUNCTION__); + TSError("[esi][%s] plugin registration failed", __FUNCTION__); return; } diff --git a/plugins/experimental/acme/acme.c b/plugins/experimental/acme/acme.c index b6b46f3..0307a53 100644 --- a/plugins/experimental/acme/acme.c +++ b/plugins/experimental/acme/acme.c @@ -337,7 +337,7 @@ TSPluginInit(int argc, const char *argv[]) info.support_email = "d...@trafficserver.apache.org"; if (TS_SUCCESS != TSPluginRegister(&info)) { - TSError("[%s] Plugin registration failed.", PLUGIN_NAME); + TSError("[%s] Plugin registration failed", PLUGIN_NAME); return; } diff --git a/plugins/experimental/ats_pagespeed/ats_pagespeed.cc b/plugins/experimental/ats_pagespeed/ats_pagespeed.cc index fdb08bb..fe90fd1 100644 --- a/plugins/experimental/ats_pagespeed/ats_pagespeed.cc +++ b/plugins/experimental/ats_pagespeed/ats_pagespeed.cc @@ -219,7 +219,7 @@ ps_determine_request_options(const RewriteOptions *domain_options, /* may be nul if (!server_context->GetQueryOptions(request_context, domain_options, url, request_headers, response_headers, &rewrite_query)) { // Failed to parse query params or request headers. Treat this as if there // were no query params given. - TSError("[ats_pagespeed] ps_route request: parsing headers or query params failed."); + TSError("[ats_pagespeed] ps_route request: parsing headers or query params failed"); return NULL; } diff --git a/plugins/experimental/buffer_upload/buffer_upload.cc b/plugins/experimental/buffer_upload/buffer_upload.cc index 2630823..8e8c26d 100644 --- a/plugins/experimental/buffer_upload/buffer_upload.cc +++ b/plugins/experimental/buffer_upload/buffer_upload.cc @@ -190,7 +190,7 @@ call_httpconnect(TSCont contp, pvc_state *my_state) // unsigned int client_ip = TSHttpTxnClientIPGet(my_state->http_txnp); sockaddr const *client_ip = TSHttpTxnClientAddrGet(my_state->http_txnp); - TSDebug(DEBUG_TAG, "call TSHttpConnect() ..."); + TSDebug(DEBUG_TAG, "call TSHttpConnect()"); if ((my_state->net_vc = TSHttpConnect(client_ip)) == nullptr) { LOG_ERROR_AND_RETURN("TSHttpConnect"); } @@ -732,7 +732,7 @@ attach_pvc_plugin(TSCont /* contp ATS_UNUSED */, TSEvent event, void *edata) if (NOT_VALID_PTR(field_loc)) { // if (VALID_PTR(str)) // TSHandleStringRelease(req_bufp, url_loc, str); - LOG_ERROR("Host field not found."); + LOG_ERROR("Host field not found"); TSHandleMLocRelease(req_bufp, req_loc, url_loc); TSHandleMLocRelease(req_bufp, TS_NULL_MLOC, req_loc); break; @@ -884,7 +884,7 @@ attach_pvc_plugin(TSCont /* contp ATS_UNUSED */, TSEvent event, void *edata) if (!uconfig->use_disk_buffer && my_state->req_size > uconfig->mem_buffer_size) { TSDebug(DEBUG_TAG, "The request size %" PRId64 " is larger than memory buffer size %" PRId64 - ", bypass upload proxy feature for this request.", + ", bypass upload proxy feature for this request", my_state->req_size, uconfig->mem_buffer_size); pvc_cleanup(new_cont, my_state); @@ -913,7 +913,7 @@ attach_pvc_plugin(TSCont /* contp ATS_UNUSED */, TSEvent event, void *edata) } } - TSDebug(DEBUG_TAG, "calling TSHttpTxnIntercept() ..."); + TSDebug(DEBUG_TAG, "calling TSHttpTxnIntercept()"); TSHttpTxnIntercept(new_cont, txnp); break; @@ -1213,7 +1213,7 @@ TSPluginInit(int argc, const char *argv[]) } // set the num of threads for disk AIO if (TSAIOThreadNumSet(uconfig->thread_num) == TS_ERROR) { - TSError("[buffer_upload] Failed to set thread number."); + TSError("[buffer_upload] Failed to set thread number"); } TSDebug(DEBUG_TAG, "uconfig->url_list_file: %s", uconfig->url_list_file); @@ -1227,12 +1227,12 @@ TSPluginInit(int argc, const char *argv[]) info.support_email = const_cast<char *>("d...@trafficserver.apache.org"); if (uconfig->use_disk_buffer && !create_directory()) { - TSError("[buffer_upload] Directory creation failed."); + TSError("[buffer_upload] Directory creation failed"); uconfig->use_disk_buffer = false; } if (TSPluginRegister(&info) != TS_SUCCESS) { - TSError("[buffer_upload] Plugin registration failed."); + TSError("[buffer_upload] Plugin registration failed"); } /* create the statistic variables */ diff --git a/plugins/experimental/cache_key_genid/cache_key_genid.c b/plugins/experimental/cache_key_genid/cache_key_genid.c index 4d0ac60..63bb2be 100644 --- a/plugins/experimental/cache_key_genid/cache_key_genid.c +++ b/plugins/experimental/cache_key_genid/cache_key_genid.c @@ -166,7 +166,7 @@ TSPluginInit(int argc, const char *argv[]) } if (TSPluginRegister(&info) != TS_SUCCESS) { - TSError("[%s] plugin registration failed. check version.", PLUGIN_NAME); + TSError("[%s] plugin registration failed, check version", PLUGIN_NAME); return; } diff --git a/plugins/experimental/collapsed_forwarding/collapsed_forwarding.cc b/plugins/experimental/collapsed_forwarding/collapsed_forwarding.cc index 7526a4d..b631020 100644 --- a/plugins/experimental/collapsed_forwarding/collapsed_forwarding.cc +++ b/plugins/experimental/collapsed_forwarding/collapsed_forwarding.cc @@ -333,7 +333,7 @@ TSPluginInit(int argc, const char *argv[]) info.support_email = (char *)"d...@trafficserver.apache.org"; if (TS_SUCCESS != TSPluginRegister(&info)) { - TSError("[%s] Plugin registration failed.", DEBUG_TAG); + TSError("[%s] Plugin registration failed", DEBUG_TAG); } process_args(argc, argv); diff --git a/plugins/experimental/custom_redirect/custom_redirect.cc b/plugins/experimental/custom_redirect/custom_redirect.cc index 30ab622..7496226 100644 --- a/plugins/experimental/custom_redirect/custom_redirect.cc +++ b/plugins/experimental/custom_redirect/custom_redirect.cc @@ -152,9 +152,9 @@ TSPluginInit(int argc, const char *argv[]) redirect_url_header_len = strlen(redirect_url_header); } if (TSPluginRegister(&info) != TS_SUCCESS) { - TSError("[custom_redirect] Plugin registration failed."); + TSError("[custom_redirect] Plugin registration failed"); } - TSError("[custom_redirect] Plugin registered successfully."); + TSError("[custom_redirect] Plugin registered successfully"); TSCont mainCont = TSContCreate(plugin_main_handler, nullptr); TSHttpHookAdd(TS_HTTP_READ_RESPONSE_HDR_HOOK, mainCont); } diff --git a/plugins/experimental/memcached_remap/memcached_remap.cc b/plugins/experimental/memcached_remap/memcached_remap.cc index 23e5dc1..88d07cd 100644 --- a/plugins/experimental/memcached_remap/memcached_remap.cc +++ b/plugins/experimental/memcached_remap/memcached_remap.cc @@ -172,7 +172,7 @@ TSPluginInit(int argc, const char *argv[]) TSDebug(PLUGIN_NAME, "about to init memcached"); if (TSPluginRegister(&info) != TS_SUCCESS) { - TSError("[memcached_remap] Plugin registration failed."); + TSError("[memcached_remap] Plugin registration failed"); return; } diff --git a/plugins/experimental/mysql_remap/mysql_remap.cc b/plugins/experimental/mysql_remap/mysql_remap.cc index f7f6527..2f2324b 100644 --- a/plugins/experimental/mysql_remap/mysql_remap.cc +++ b/plugins/experimental/mysql_remap/mysql_remap.cc @@ -191,7 +191,7 @@ TSPluginInit(int argc, const char *argv[]) info.support_email = const_cast<char *>("d...@trafficserver.apache.org"); if (TSPluginRegister(&info) != TS_SUCCESS) { - TSError("[mysql_remap] Plugin registration failed."); + TSError("[mysql_remap] Plugin registration failed"); } if (argc != 2) { diff --git a/plugins/experimental/remap_stats/remap_stats.c b/plugins/experimental/remap_stats/remap_stats.c index 2d32834..8ec9a9a 100644 --- a/plugins/experimental/remap_stats/remap_stats.c +++ b/plugins/experimental/remap_stats/remap_stats.c @@ -249,11 +249,11 @@ TSPluginInit(int argc, const char *argv[]) info.support_email = "d...@trafficserver.apache.org"; if (TSPluginRegister(&info) != TS_SUCCESS) { - TSError("[remap_stats] Plugin registration failed."); + TSError("[remap_stats] Plugin registration failed"); return; } else { - TSDebug(DEBUG_TAG, "Plugin registration succeeded."); + TSDebug(DEBUG_TAG, "Plugin registration succeeded"); } config = TSmalloc(sizeof(config_t)); diff --git a/plugins/experimental/ssl_cert_loader/ssl-cert-loader.cc b/plugins/experimental/ssl_cert_loader/ssl-cert-loader.cc index 21b479d..669b159 100644 --- a/plugins/experimental/ssl_cert_loader/ssl-cert-loader.cc +++ b/plugins/experimental/ssl_cert_loader/ssl-cert-loader.cc @@ -518,15 +518,15 @@ TSPluginInit(int argc, const char *argv[]) } if (TS_SUCCESS != TSPluginRegister(&info)) { - TSError(PCP "registration failed."); + TSError(PCP "registration failed"); } else if (TSTrafficServerVersionGetMajor() < 5) { - TSError(PCP "requires Traffic Server 5.0 or later."); + TSError(PCP "requires Traffic Server 5.0 or later"); } else if (nullptr == (cb_pa = TSContCreate(&CB_Pre_Accept, TSMutexCreate()))) { - TSError(PCP "Failed to pre-accept callback."); + TSError(PCP "Failed to pre-accept callback"); } else if (nullptr == (cb_lc = TSContCreate(&CB_Life_Cycle, TSMutexCreate()))) { - TSError(PCP "Failed to lifecycle callback."); + TSError(PCP "Failed to lifecycle callback"); } else if (nullptr == (cb_sni = TSContCreate(&CB_servername, TSMutexCreate()))) { - TSError(PCP "Failed to create SNI callback."); + TSError(PCP "Failed to create SNI callback"); } else { TSLifecycleHookAdd(TS_LIFECYCLE_PORTS_INITIALIZED_HOOK, cb_lc); TSHttpHookAdd(TS_VCONN_PRE_ACCEPT_HOOK, cb_pa); @@ -553,7 +553,7 @@ TSPluginInit(int argc, const char *argv[]) void TSPluginInit(int, const char *[]) { - TSError(PCP "requires TLS SNI which is not available."); + TSError(PCP "requires TLS SNI which is not available"); } #endif // TS_USE_TLS_SNI diff --git a/plugins/experimental/stale_while_revalidate/stale_while_revalidate.c b/plugins/experimental/stale_while_revalidate/stale_while_revalidate.c index 01aa89f..700787f 100644 --- a/plugins/experimental/stale_while_revalidate/stale_while_revalidate.c +++ b/plugins/experimental/stale_while_revalidate/stale_while_revalidate.c @@ -399,7 +399,7 @@ consume_resource(TSCont cont, TSEvent event ATS_UNUSED, void *edata ATS_UNUSED) TSContDestroy(cont); break; default: - TSError("[%s] Unknown event %d.", PLUGIN_NAME, event); + TSError("[%s] Unknown event %d", PLUGIN_NAME, event); break; } @@ -703,7 +703,7 @@ TSPluginInit(int argc, const char *argv[]) return; } else { - TSDebug(PLUGIN_NAME, "Plugin registration succeeded."); + TSDebug(PLUGIN_NAME, "Plugin registration succeeded"); } plugin_config = TSmalloc(sizeof(config_t)); @@ -763,6 +763,6 @@ TSPluginInit(int argc, const char *argv[]) TSContDataSet(main_cont, (void *)plugin_config); TSHttpHookAdd(TS_HTTP_READ_REQUEST_HDR_HOOK, main_cont); - TSDebug(PLUGIN_NAME, "Plugin Init Complete."); + TSDebug(PLUGIN_NAME, "Plugin Init Complete"); } } diff --git a/plugins/experimental/stream_editor/stream_editor.cc b/plugins/experimental/stream_editor/stream_editor.cc index 5801f68..35db91f 100644 --- a/plugins/experimental/stream_editor/stream_editor.cc +++ b/plugins/experimental/stream_editor/stream_editor.cc @@ -839,7 +839,7 @@ TSPluginInit(int argc, const char *argv[]) info.support_email = (char *)"us...@trafficserver.apache.org"; if (TSPluginRegister(&info) != TS_SUCCESS) { - TSError("[stream-editor] Plugin registration failed."); + TSError("[stream-editor] Plugin registration failed"); return; } diff --git a/plugins/experimental/ts_lua/ts_lua.c b/plugins/experimental/ts_lua/ts_lua.c index 25c9710..c1f053a 100644 --- a/plugins/experimental/ts_lua/ts_lua.c +++ b/plugins/experimental/ts_lua/ts_lua.c @@ -407,7 +407,7 @@ TSPluginInit(int argc, const char *argv[]) info.support_email = "d...@trafficserver.apache.org"; if (TSPluginRegister(&info) != TS_SUCCESS) { - TSError("[ts_lua] Plugin registration failed."); + TSError("[ts_lua] Plugin registration failed"); } int ret = 0; diff --git a/plugins/experimental/ts_lua/ts_lua_package.c b/plugins/experimental/ts_lua/ts_lua_package.c index 43e0a40d..6b97832 100644 --- a/plugins/experimental/ts_lua/ts_lua_package.c +++ b/plugins/experimental/ts_lua/ts_lua_package.c @@ -69,7 +69,7 @@ ts_lua_add_package_path(lua_State *L) conf = ts_lua_get_instance_conf(L); if (conf == NULL) { - return luaL_error(L, "cann't get the instance conf."); + return luaL_error(L, "can't get the instance conf"); } data = luaL_checklstring(L, 1, &dlen); @@ -99,7 +99,7 @@ ts_lua_add_package_path(lua_State *L) if (i >= g_path_cnt) { if (n + i >= TS_LUA_MAX_PACKAGE_NUM) - return luaL_error(L, "extended package path number exceeds %d.", TS_LUA_MAX_PACKAGE_NUM); + return luaL_error(L, "extended package path number exceeds %d", TS_LUA_MAX_PACKAGE_NUM); pp[n].name = (char *)ptr; pp[n].len = item_len; @@ -115,7 +115,7 @@ ts_lua_add_package_path(lua_State *L) if (i >= path_cnt) { if (n + i >= TS_LUA_MAX_PACKAGE_NUM) - return luaL_error(L, "extended package path number exceeds %d.", TS_LUA_MAX_PACKAGE_NUM); + return luaL_error(L, "extended package path number exceeds %d", TS_LUA_MAX_PACKAGE_NUM); pp[n].name = (char *)ptr; pp[n].len = item_len; @@ -168,7 +168,7 @@ ts_lua_add_package_path_items(lua_State *L, ts_lua_package_path *pp, int n) lua_getglobal(L, "package"); if (!lua_istable(L, -1)) { - return luaL_error(L, "'package' table does not exist."); + return luaL_error(L, "'package' table does not exist"); } lua_getfield(L, -1, "path"); /* get old package.path */ @@ -182,7 +182,7 @@ ts_lua_add_package_path_items(lua_State *L, ts_lua_package_path *pp, int n) for (i = 0; i < n; i++) { if (new_path_len + pp[i].len + 1 >= sizeof(new_path)) { - TSError("[ts_lua] Extended package.path is too long."); + TSError("[ts_lua] Extended package.path is too long"); return -1; } @@ -215,7 +215,7 @@ ts_lua_add_package_cpath(lua_State *L) conf = ts_lua_get_instance_conf(L); if (conf == NULL) { - return luaL_error(L, "cann't get the instance conf."); + return luaL_error(L, "can't get the instance conf"); } data = luaL_checklstring(L, 1, &dlen); @@ -245,7 +245,7 @@ ts_lua_add_package_cpath(lua_State *L) if (i >= g_cpath_cnt) { if (n + i >= TS_LUA_MAX_PACKAGE_NUM) - return luaL_error(L, "extended package cpath number exceeds %d.", TS_LUA_MAX_PACKAGE_NUM); + return luaL_error(L, "extended package cpath number exceeds %d", TS_LUA_MAX_PACKAGE_NUM); pp[n].name = (char *)ptr; pp[n].len = item_len; @@ -261,7 +261,7 @@ ts_lua_add_package_cpath(lua_State *L) if (i >= cpath_cnt) { if (n + i >= TS_LUA_MAX_PACKAGE_NUM) - return luaL_error(L, "extended package cpath number exceeds %d.", TS_LUA_MAX_PACKAGE_NUM); + return luaL_error(L, "extended package cpath number exceeds %d", TS_LUA_MAX_PACKAGE_NUM); pp[n].name = (char *)ptr; pp[n].len = item_len; @@ -314,7 +314,7 @@ ts_lua_add_package_cpath_items(lua_State *L, ts_lua_package_path *pp, int n) lua_getglobal(L, "package"); if (!lua_istable(L, -1)) { - return luaL_error(L, "'package' table does not exist."); + return luaL_error(L, "'package' table does not exist"); } lua_getfield(L, -1, "cpath"); /* get old package.cpath */ @@ -328,7 +328,7 @@ ts_lua_add_package_cpath_items(lua_State *L, ts_lua_package_path *pp, int n) for (i = 0; i < n; i++) { if (new_path_len + pp[i].len + 1 >= sizeof(new_path)) { - TSError("[ts_lua] Extended package.cpath is too long."); + TSError("[ts_lua] Extended package.cpath is too long"); return -1; } diff --git a/plugins/experimental/url_sig/url_sig.c b/plugins/experimental/url_sig/url_sig.c index 240c9a5..06bf689 100644 --- a/plugins/experimental/url_sig/url_sig.c +++ b/plugins/experimental/url_sig/url_sig.c @@ -54,7 +54,7 @@ struct config { static void free_cfg(struct config *cfg) { - TSError("[url_sig] Cleaning up..."); + TSError("[url_sig] Cleaning up"); TSfree(cfg->err_url); if (cfg->regex_extra) { @@ -99,7 +99,7 @@ TSRemapNewInstance(int argc, char *argv[], void **ih, char *errbuf, int errbuf_s if (argc != 3) { snprintf(errbuf, errbuf_size - 1, - "[TSRemapNewKeyInstance] - Argument count wrong (%d)... Need exactly two pparam= (config file name).", argc); + "[TSRemapNewKeyInstance] - Argument count wrong (%d)... Need exactly two pparam= (config file name)", argc); return TS_ERROR; } TSDebug(PLUGIN_NAME, "Initializing remap function of %s -> %s with config from %s", argv[0], argv[1], argv[2]); @@ -109,7 +109,7 @@ TSRemapNewInstance(int argc, char *argv[], void **ih, char *errbuf, int errbuf_s TSDebug(PLUGIN_NAME, "config file name: %s", config_file); FILE *file = fopen(config_file, "r"); if (file == NULL) { - snprintf(errbuf, errbuf_size - 1, "[TSRemapNewInstance] - Error opening file %s.", config_file); + snprintf(errbuf, errbuf_size - 1, "[TSRemapNewInstance] - Error opening file %s", config_file); return TS_ERROR; } @@ -128,7 +128,7 @@ TSRemapNewInstance(int argc, char *argv[], void **ih, char *errbuf, int errbuf_s } char *pos = strchr(line, '='); if (pos == NULL) { - TSError("[url_sig] Error parsing line %d of file %s (%s).", line_no, config_file, line); + TSError("[url_sig] Error parsing line %d of file %s (%s)", line_no, config_file, line); continue; } *pos = '\0'; @@ -141,7 +141,7 @@ TSRemapNewInstance(int argc, char *argv[], void **ih, char *errbuf, int errbuf_s *pos = '\0'; } if (pos == NULL || strlen(value) >= MAX_KEY_LEN) { - snprintf(errbuf, errbuf_size - 1, "[TSRemapNewInstance] - Maximum key length (%d) exceeded on line %d.", MAX_KEY_LEN - 1, + snprintf(errbuf, errbuf_size - 1, "[TSRemapNewInstance] - Maximum key length (%d) exceeded on line %d", MAX_KEY_LEN - 1, line_no); fclose(file); free_cfg(cfg); @@ -159,8 +159,7 @@ TSRemapNewInstance(int argc, char *argv[], void **ih, char *errbuf, int errbuf_s } TSDebug(PLUGIN_NAME, "key number %d == %s", keynum, value); if (keynum >= MAX_KEY_NUM || keynum < 0) { - snprintf(errbuf, errbuf_size - 1, "[TSRemapNewInstance] - Key number (%d) >= MAX_KEY_NUM (%d) or NaN.", keynum, - MAX_KEY_NUM); + snprintf(errbuf, errbuf_size - 1, "[TSRemapNewInstance] - Key number (%d) >= MAX_KEY_NUM (%d) or NaN", keynum, MAX_KEY_NUM); fclose(file); free_cfg(cfg); return TS_ERROR; @@ -191,7 +190,7 @@ TSRemapNewInstance(int argc, char *argv[], void **ih, char *errbuf, int errbuf_s cfg->regex = pcre_compile(value, options, &errptr, &erroffset, NULL); if (cfg->regex == NULL) { - TSDebug(PLUGIN_NAME, "Regex compilation failed with error (%s) at character %d.", errptr, erroffset); + TSDebug(PLUGIN_NAME, "Regex compilation failed with error (%s) at character %d", errptr, erroffset); } else { #ifdef PCRE_STUDY_JIT_COMPILE options = PCRE_STUDY_JIT_COMPILE; @@ -200,7 +199,7 @@ TSRemapNewInstance(int argc, char *argv[], void **ih, char *errbuf, int errbuf_s cfg->regex, options, &errptr); // We do not need to check the error here because we can still run without the studying? } } else { - TSError("[url_sig] Error parsing line %d of file %s (%s).", line_no, config_file, line); + TSError("[url_sig] Error parsing line %d of file %s (%s)", line_no, config_file, line); } } @@ -222,7 +221,7 @@ TSRemapNewInstance(int argc, char *argv[], void **ih, char *errbuf, int errbuf_s } break; default: - snprintf(errbuf, errbuf_size - 1, "[TSRemapNewInstance] - Return code %d not supported.", cfg->err_status); + snprintf(errbuf, errbuf_size - 1, "[TSRemapNewInstance] - Return code %d not supported", cfg->err_status); fclose(file); free_cfg(cfg); return TS_ERROR; @@ -261,7 +260,7 @@ getAppQueryString(char *query_string, int query_length) char buf[MAX_QUERY_LEN]; if (query_length > MAX_QUERY_LEN) { - TSDebug(PLUGIN_NAME, "Cannot process the query string as the length exceeds %d bytes.", MAX_QUERY_LEN); + TSDebug(PLUGIN_NAME, "Cannot process the query string as the length exceeds %d bytes", MAX_QUERY_LEN); return NULL; } memset(buf, 0, MAX_QUERY_LEN); @@ -343,7 +342,7 @@ TSRemapDoRemap(void *ih, TSHttpTxn txnp, TSRemapRequestInfo *rri) url = TSUrlStringGet(rri->requestBufp, rri->requestUrl, &url_len); if (url_len >= MAX_REQ_LEN - 1) { - err_log(url, "URL string too long."); + err_log(url, "URL string too long"); goto deny; } @@ -369,12 +368,12 @@ TSRemapDoRemap(void *ih, TSHttpTxn txnp, TSRemapRequestInfo *rri) } if (query == NULL) { - err_log(url, "Has no query string."); + err_log(url, "Has no query string"); goto deny; } if (strncmp(url, "http://", strlen("http://")) != 0) { - err_log(url, "Invalid URL scheme - only http supported."); + err_log(url, "Invalid URL scheme - only http supported"); goto deny; } @@ -388,7 +387,7 @@ TSRemapDoRemap(void *ih, TSHttpTxn txnp, TSRemapRequestInfo *rri) p += strlen(CIP_QSTRING + 1); pp = strstr(p, "&"); if ((pp - p) > CIP_STRLEN - 1 || (pp - p) < 4) { - err_log(url, "IP address string too long or short."); + err_log(url, "IP address string too long or short"); goto deny; } strncpy(client_ip, p + strlen(CIP_QSTRING) + 1, (pp - p - (strlen(CIP_QSTRING) + 1))); @@ -396,7 +395,7 @@ TSRemapDoRemap(void *ih, TSHttpTxn txnp, TSRemapRequestInfo *rri) TSDebug(PLUGIN_NAME, "CIP: -%s-", client_ip); retval = TSHttpTxnClientFdGet(txnp, &sockfd); if (retval != TS_SUCCESS) { - err_log(url, "Error getting sockfd."); + err_log(url, "Error getting sockfd"); goto deny; } peer_len = sizeof(peer); @@ -407,7 +406,7 @@ TSRemapDoRemap(void *ih, TSHttpTxn txnp, TSRemapRequestInfo *rri) inet_ntop(AF_INET, &s->sin_addr, ipstr, sizeof ipstr); TSDebug(PLUGIN_NAME, "Peer address: -%s-", ipstr); if (strcmp(ipstr, client_ip) != 0) { - err_log(url, "Client IP doesn't match signature."); + err_log(url, "Client IP doesn't match signature"); goto deny; } } @@ -417,12 +416,12 @@ TSRemapDoRemap(void *ih, TSHttpTxn txnp, TSRemapRequestInfo *rri) p += strlen(EXP_QSTRING) + 1; expiration = atoi(p); if (expiration == 0 || expiration < time(NULL)) { - err_log(url, "Invalid expiration, or expired."); + err_log(url, "Invalid expiration, or expired"); goto deny; } TSDebug(PLUGIN_NAME, "Exp: %d", (int)expiration); } else { - err_log(url, "Expiration query string not found."); + err_log(url, "Expiration query string not found"); goto deny; } // Algorithm @@ -433,7 +432,7 @@ TSRemapDoRemap(void *ih, TSHttpTxn txnp, TSRemapRequestInfo *rri) // The check for a valid algorithm is later. TSDebug(PLUGIN_NAME, "Algorithm: %d", algorithm); } else { - err_log(url, "Algorithm query string not found."); + err_log(url, "Algorithm query string not found"); goto deny; } // Key index @@ -442,12 +441,12 @@ TSRemapDoRemap(void *ih, TSHttpTxn txnp, TSRemapRequestInfo *rri) p += strlen(KIN_QSTRING) + 1; keyindex = atoi(p); if (keyindex < 0 || keyindex >= MAX_KEY_NUM || 0 == cfg->keys[keyindex][0]) { - err_log(url, "Invalid key index."); + err_log(url, "Invalid key index"); goto deny; } TSDebug(PLUGIN_NAME, "Key Index: %d", keyindex); } else { - err_log(url, "KeyIndex query string not found."); + err_log(url, "KeyIndex query string not found"); goto deny; } // Parts @@ -458,7 +457,7 @@ TSRemapDoRemap(void *ih, TSHttpTxn txnp, TSRemapRequestInfo *rri) p = strstr(parts, "&"); TSDebug(PLUGIN_NAME, "Parts: %.*s", (int)(p - parts), parts); } else { - err_log(url, "PartsSigned query string not found."); + err_log(url, "PartsSigned query string not found"); goto deny; } // And finally, the sig (has to be last) @@ -468,11 +467,11 @@ TSRemapDoRemap(void *ih, TSHttpTxn txnp, TSRemapRequestInfo *rri) signature = p; // NOTE sig is not NULL terminated, it has to be 20 chars if ((algorithm == USIG_HMAC_SHA1 && strlen(signature) < SHA1_SIG_SIZE) || (algorithm == USIG_HMAC_MD5 && strlen(signature) < MD5_SIG_SIZE)) { - err_log(url, "Signature query string too short (< 20)."); + err_log(url, "Signature query string too short (< 20)"); goto deny; } } else { - err_log(url, "Signature query string not found."); + err_log(url, "Signature query string not found"); goto deny; } @@ -524,7 +523,7 @@ TSRemapDoRemap(void *ih, TSHttpTxn txnp, TSRemapRequestInfo *rri) } break; default: - err_log(url, "Algorithm not supported."); + err_log(url, "Algorithm not supported"); goto deny; } @@ -537,10 +536,10 @@ TSRemapDoRemap(void *ih, TSHttpTxn txnp, TSRemapRequestInfo *rri) /* and compare to signature that was sent */ cmp_res = strncmp(sig_string, signature, sig_len * 2); if (cmp_res != 0) { - err_log(url, "Signature check failed."); + err_log(url, "Signature check failed"); goto deny; } else { - TSDebug(PLUGIN_NAME, "Signature check passed."); + TSDebug(PLUGIN_NAME, "Signature check passed"); goto allow; } @@ -583,7 +582,7 @@ allow: rval = TSUrlHttpQuerySet(rri->requestBufp, rri->requestUrl, NULL, 0); } if (rval != TS_SUCCESS) { - TSError("[url_sig] Error setting the query string: %d.", rval); + TSError("[url_sig] Error setting the query string: %d", rval); } return TSREMAP_NO_REMAP; } diff --git a/plugins/header_rewrite/header_rewrite.cc b/plugins/header_rewrite/header_rewrite.cc index 1f30de2..e3709d3 100644 --- a/plugins/header_rewrite/header_rewrite.cc +++ b/plugins/header_rewrite/header_rewrite.cc @@ -327,7 +327,7 @@ TSPluginInit(int argc, const char *argv[]) info.support_email = (char *)"d...@trafficserver.apache.org"; if (TS_SUCCESS != TSPluginRegister(&info)) { - TSError("[%s] plugin registration failed.", PLUGIN_NAME); + TSError("[%s] plugin registration failed", PLUGIN_NAME); } // Parse the global config file(s). All rules are just appended diff --git a/plugins/header_rewrite/parser.cc b/plugins/header_rewrite/parser.cc index 3929f29..77da446 100644 --- a/plugins/header_rewrite/parser.cc +++ b/plugins/header_rewrite/parser.cc @@ -82,7 +82,7 @@ Parser::Parser(const std::string &original_line) : _cond(false), _empty(false) extracting_token = false; } else { // Malformed expression / operation, ignore ... - TSError("[%s] malformed line \"%s\" ignoring...", PLUGIN_NAME, line.c_str()); + TSError("[%s] malformed line \"%s\", ignoring", PLUGIN_NAME, line.c_str()); _tokens.clear(); _empty = true; return; @@ -111,7 +111,7 @@ Parser::Parser(const std::string &original_line) : _cond(false), _empty(false) _tokens.push_back(line.substr(cur_token_start)); } else { // unterminated quote, error case. - TSError("[%s] malformed line, unterminated quotation: \"%s\" ignoring...", PLUGIN_NAME, line.c_str()); + TSError("[%s] malformed line, unterminated quotation: \"%s\", ignoring", PLUGIN_NAME, line.c_str()); _tokens.clear(); _empty = true; return; diff --git a/plugins/healthchecks/healthchecks.c b/plugins/healthchecks/healthchecks.c index 995151e..c87c94d 100644 --- a/plugins/healthchecks/healthchecks.c +++ b/plugins/healthchecks/healthchecks.c @@ -565,7 +565,7 @@ TSPluginInit(int argc, const char *argv[]) TSPluginRegistrationInfo info; if (2 != argc) { - TSError("[healthchecks] Must specify a configuration file."); + TSError("[healthchecks] Must specify a configuration file"); return; } @@ -574,7 +574,7 @@ TSPluginInit(int argc, const char *argv[]) info.support_email = "d...@trafficserver.apache.org"; if (TS_SUCCESS != TSPluginRegister(&info)) { - TSError("[healthchecks] Plugin registration failed."); + TSError("[healthchecks] Plugin registration failed"); return; } diff --git a/plugins/regex_revalidate/regex_revalidate.c b/plugins/regex_revalidate/regex_revalidate.c index 1c352b8..2a5e531 100644 --- a/plugins/regex_revalidate/regex_revalidate.c +++ b/plugins/regex_revalidate/regex_revalidate.c @@ -478,7 +478,7 @@ TSPluginInit(int argc, const char *argv[]) plugin_state_t *pstate; invalidate_t *iptr = NULL; - TSDebug(LOG_PREFIX, "Starting plugin init."); + TSDebug(LOG_PREFIX, "Starting plugin init"); pstate = (plugin_state_t *)TSmalloc(sizeof(plugin_state_t)); init_plugin_state_t(pstate); @@ -505,7 +505,7 @@ TSPluginInit(int argc, const char *argv[]) } if (!pstate->config_file) { - TSError("[regex_revalidate] Plugin requires a --config option along with a config file name."); + TSError("[regex_revalidate] Plugin requires a --config option along with a config file name"); free_plugin_state_t(pstate); return; } @@ -522,12 +522,12 @@ TSPluginInit(int argc, const char *argv[]) info.support_email = "d...@trafficserver.apache.org"; if (TSPluginRegister(&info) != TS_SUCCESS) { - TSError("[regex_revalidate] Plugin registration failed."); + TSError("[regex_revalidate] Plugin registration failed"); free_plugin_state_t(pstate); return; } else { - TSDebug(LOG_PREFIX, "Plugin registration succeeded."); + TSDebug(LOG_PREFIX, "Plugin registration succeeded"); } if (!check_ts_version()) { @@ -547,5 +547,5 @@ TSPluginInit(int argc, const char *argv[]) TSContDataSet(config_cont, (void *)pstate); TSContSchedule(config_cont, CONFIG_TMOUT, TS_THREAD_POOL_TASK); - TSDebug(LOG_PREFIX, "Plugin Init Complete."); + TSDebug(LOG_PREFIX, "Plugin Init Complete"); } diff --git a/plugins/tcpinfo/tcpinfo.cc b/plugins/tcpinfo/tcpinfo.cc index c0e451a..c1d2148 100644 --- a/plugins/tcpinfo/tcpinfo.cc +++ b/plugins/tcpinfo/tcpinfo.cc @@ -361,7 +361,7 @@ TSPluginInit(int argc, const char *argv[]) case 'e': i = strtoul(optarg, &endptr, 10); if (*endptr != '\0' || i > 3) { - TSError("[tcpinfo] invalid rolling-enabled argument, '%s', using default of %d.", optarg, rolling_enabled); + TSError("[tcpinfo] invalid rolling-enabled argument, '%s', using default of %d", optarg, rolling_enabled); } else { rolling_enabled = i; } @@ -369,7 +369,7 @@ TSPluginInit(int argc, const char *argv[]) case 'H': i = strtoul(optarg, &endptr, 10); if (*endptr != '\0' || i > 23) { - TSError("[tcpinfo] invalid rolling-offset-hr argument, '%s', using default of %d.", optarg, rolling_offset_hr); + TSError("[tcpinfo] invalid rolling-offset-hr argument, '%s', using default of %d", optarg, rolling_offset_hr); } else { rolling_offset_hr = i; } @@ -377,7 +377,7 @@ TSPluginInit(int argc, const char *argv[]) case 'S': i = strtoul(optarg, &endptr, 10); if (*endptr != '\0' || i < 60 || i > 86400) { - TSError("[tcpinfo] invalid rolling-interval-sec argument, '%s', using default of %d.", optarg, rolling_interval_sec); + TSError("[tcpinfo] invalid rolling-interval-sec argument, '%s', using default of %d", optarg, rolling_interval_sec); } else { rolling_interval_sec = i; } @@ -385,7 +385,7 @@ TSPluginInit(int argc, const char *argv[]) case 'M': i = ink_atoui(optarg); if (i < 10) { - TSError("[tcpinfo] invalid rolling-size argument, '%s', using default of %d.", optarg, rolling_size); + TSError("[tcpinfo] invalid rolling-size argument, '%s', using default of %d", optarg, rolling_size); } else { rolling_size = i; } -- To stop receiving notification emails like this one, please contact ['"commits@trafficserver.apache.org" <commits@trafficserver.apache.org>'].