Type change to avoid Windows compilation issues

This commit is contained in:
Luca Deri
2020-12-17 12:58:12 +01:00
parent 2768da0637
commit df1b3367a9
3 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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);
+2 -1
View File
@@ -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)) {