diff options
author | Luca Deri <deri@ntop.org> | 2017-09-17 23:34:46 +0200 |
---|---|---|
committer | Luca Deri <deri@ntop.org> | 2017-09-17 23:34:46 +0200 |
commit | 1a4e57e7366685e5ece5ed8576155c5e7c934efb (patch) | |
tree | 15df4a8d06bec120e0f68afa3fa57a564725238e /src/lib/protocols/http.c | |
parent | d6f7dd9c08b8abcaa964f19c3f34c24ed2c558cd (diff) |
Code rework
Diffstat (limited to 'src/lib/protocols/http.c')
-rw-r--r-- | src/lib/protocols/http.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/protocols/http.c b/src/lib/protocols/http.c index 3fd304867..4ff65096b 100644 --- a/src/lib/protocols/http.c +++ b/src/lib/protocols/http.c @@ -167,7 +167,7 @@ static void setHttpUserAgent(struct ndpi_flow_struct *flow, char *ua) { * https://github.com/ua-parser/uap-core/blob/master/regexes.yaml */ //printf("==> %s\n", ua); - snprintf((char*)flow->detected_os, sizeof(flow->detected_os), "%s", ua); + snprintf((char*)flow->protos.http.detected_os, sizeof(flow->protos.http.detected_os), "%s", ua); } static void parseHttpSubprotocol(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow) { @@ -360,9 +360,9 @@ static void check_content_type_and_change_protocol(struct ndpi_detection_module_ strncpy((char*)flow->host_server_name, (char*)packet->host_line.ptr, len); flow->host_server_name[len] = '\0', flow->server_id = flow->dst; - len = ndpi_min(packet->forwarded_line.len, sizeof(flow->nat_ip)-1); - strncpy((char*)flow->nat_ip, (char*)packet->forwarded_line.ptr, len); - flow->nat_ip[len] = '\0'; + len = ndpi_min(packet->forwarded_line.len, sizeof(flow->protos.http.nat_ip)-1); + strncpy((char*)flow->protos.http.nat_ip, (char*)packet->forwarded_line.ptr, len); + flow->protos.http.nat_ip[len] = '\0'; if(ndpi_struct->http_dont_dissect_response) parseHttpSubprotocol(ndpi_struct, flow); |