aboutsummaryrefslogtreecommitdiff
path: root/src/lib/protocols/bittorrent.c
diff options
context:
space:
mode:
authorLuca Deri <deri@ntop.org>2017-09-17 23:34:46 +0200
committerLuca Deri <deri@ntop.org>2017-09-17 23:34:46 +0200
commit1a4e57e7366685e5ece5ed8576155c5e7c934efb (patch)
tree15df4a8d06bec120e0f68afa3fa57a564725238e /src/lib/protocols/bittorrent.c
parentd6f7dd9c08b8abcaa964f19c3f34c24ed2c558cd (diff)
Code rework
Diffstat (limited to 'src/lib/protocols/bittorrent.c')
-rw-r--r--src/lib/protocols/bittorrent.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/protocols/bittorrent.c b/src/lib/protocols/bittorrent.c
index e7a5e890a..a3eef585c 100644
--- a/src/lib/protocols/bittorrent.c
+++ b/src/lib/protocols/bittorrent.c
@@ -67,7 +67,7 @@ static void ndpi_add_connection_as_bittorrent(struct ndpi_detection_module_struc
} else
bt_hash = (const char*)&flow->packet.payload[28];
- if(bt_hash) memcpy(flow->bittorent_hash, bt_hash, 20);
+ if(bt_hash) memcpy(flow->protos.bittorrent.hash, bt_hash, 20);
}
ndpi_int_change_protocol(ndpi_struct, flow, NDPI_PROTOCOL_BITTORRENT, NDPI_PROTOCOL_UNKNOWN);
@@ -479,7 +479,7 @@ void ndpi_search_bittorrent(struct ndpi_detection_module_struct *ndpi_struct, st
) {
bittorrent_found:
if(bt_proto && (packet->payload_packet_len > 47))
- memcpy(flow->bittorent_hash, &bt_proto[27], 20);
+ memcpy(flow->protos.bittorrent.hash, &bt_proto[27], 20);
NDPI_LOG(NDPI_PROTOCOL_BITTORRENT,
ndpi_struct, NDPI_LOG_TRACE, "BT: plain BitTorrent protocol detected\n");