Code rework

This commit is contained in:
Luca Deri
2017-09-17 23:34:46 +02:00
parent d6f7dd9c08
commit 1a4e57e736
5 changed files with 28 additions and 20 deletions
+2 -2
View File
@@ -421,8 +421,8 @@ void process_ndpi_collected_info(struct ndpi_workflow * workflow, struct ndpi_fl
int i, j, n = 0;
for(i=0, j = 0; j < sizeof(flow->bittorent_hash)-1; i++) {
sprintf(&flow->bittorent_hash[j], "%02x", flow->ndpi_flow->bittorent_hash[i]);
j += 2, n += flow->ndpi_flow->bittorent_hash[i];
sprintf(&flow->bittorent_hash[j], "%02x", flow->ndpi_flow->protos.bittorrent.hash[i]);
j += 2, n += flow->ndpi_flow->protos.bittorrent.hash[i];
}
if(n == 0) flow->bittorent_hash[0] = '\0';