diff options
author | Luca Deri <deri@ntop.org> | 2020-12-17 12:58:12 +0100 |
---|---|---|
committer | Luca Deri <deri@ntop.org> | 2020-12-17 12:58:12 +0100 |
commit | df1b3367a9dffa937cd2cc0de460d4394079ec6e (patch) | |
tree | 1758f13c66fbdff11620e68752128ea0190912ae /src | |
parent | 2768da06377ab64fccbb1bf97460e892e0548a60 (diff) |
Type change to avoid Windows compilation issues
Diffstat (limited to 'src')
-rw-r--r-- | src/include/ndpi_api.h.in | 2 | ||||
-rw-r--r-- | src/lib/ndpi_utils.c | 2 | ||||
-rw-r--r-- | src/lib/protocols/http.c | 3 |
3 files changed, 4 insertions, 3 deletions
diff --git a/src/include/ndpi_api.h.in b/src/include/ndpi_api.h.in index c0f0042de..5c8e26c6f 100644 --- a/src/include/ndpi_api.h.in +++ b/src/include/ndpi_api.h.in @@ -932,7 +932,7 @@ extern "C" { void ndpi_md5(const u_char *data, size_t data_len, u_char hash[16]); const char* ndpi_http_method2str(ndpi_http_method m); - ndpi_http_method ndpi_http_str2method(const char* method, ssize_t method_len); + ndpi_http_method ndpi_http_str2method(const char* method, u_int16_t method_len); /* ptree (trie) API */ ndpi_ptree_t* ndpi_ptree_create(void); diff --git a/src/lib/ndpi_utils.c b/src/lib/ndpi_utils.c index 53f8019dd..88f4356a8 100644 --- a/src/lib/ndpi_utils.c +++ b/src/lib/ndpi_utils.c @@ -1748,7 +1748,7 @@ const char* ndpi_http_method2str(ndpi_http_method m) { /* ******************************************************************** */ -ndpi_http_method ndpi_http_str2method(const char* method, ssize_t method_len) { +ndpi_http_method ndpi_http_str2method(const char* method, u_int16_t method_len) { if(!method || method_len < 3) return(NDPI_HTTP_METHOD_UNKNOWN); diff --git a/src/lib/protocols/http.c b/src/lib/protocols/http.c index 266b441ac..cc81644aa 100644 --- a/src/lib/protocols/http.c +++ b/src/lib/protocols/http.c @@ -441,7 +441,8 @@ static void check_content_type_and_change_protocol(struct ndpi_detection_module_ ndpi_check_http_url(ndpi_struct, flow, &flow->http.url[packet->host_line.len]); } - flow->http.method = ndpi_http_str2method((const char*)flow->packet.http_method.ptr, flow->packet.http_method.len); + flow->http.method = ndpi_http_str2method((const char*)flow->packet.http_method.ptr, + (u_int16_t)flow->packet.http_method.len); } if(packet->server_line.ptr != NULL && (packet->server_line.len > 7)) { |