diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/http_decoder.cpp | 6 | ||||
| -rw-r--r-- | src/http_decoder_inc.h | 3 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/http_decoder.cpp b/src/http_decoder.cpp index 551b0b0..9b861d9 100644 --- a/src/http_decoder.cpp +++ b/src/http_decoder.cpp @@ -545,11 +545,11 @@ extern "C" if (ret < 0) { stellar_session_plugin_dettach_current_session(sess); - return (void *)"__not_http_session__"; + return (void *)HTTP_CTX_NOT_HTTP; } } - return (void *)"__fake_http_decoder_ctx__"; + return (void *)HTTP_CTX_IS_HTTP; } void httpd_session_ctx_free_cb(struct session *sess, void *session_ctx, void *plugin_env) @@ -557,7 +557,7 @@ extern "C" if(NULL == plugin_env || NULL == session_ctx){ return; } - if(strncmp((const char *)session_ctx, "__not_http_session__", strlen("__not_http_session__")) == 0){ + if(strncmp((const char *)session_ctx, HTTP_CTX_NOT_HTTP, strlen(HTTP_CTX_NOT_HTTP)) == 0){ return; } struct http_decoder_env *httpd_env = (struct http_decoder_env *)plugin_env; diff --git a/src/http_decoder_inc.h b/src/http_decoder_inc.h index 9b64cad..13f0369 100644 --- a/src/http_decoder_inc.h +++ b/src/http_decoder_inc.h @@ -65,6 +65,9 @@ extern "C" #define HTTPD_CFG_FILE "./etc/http/http_decoder.toml" #define FILEDSTAT_OUTPUT_FILE "./http_decoder.fs4" +#define HTTP_CTX_NOT_HTTP "__NOT_HTTP_SESS__" +#define HTTP_CTX_IS_HTTP "__FAKE_HTTP_CTX__" + struct http_decoder_config { int decompress_switch; |
