From 30ed4e221fdc46b930a301636b3eb2dcb77ccf38 Mon Sep 17 00:00:00 2001 From: "Shravan Rangarajuvenkata (shrarang)" Date: Thu, 15 Aug 2019 10:30:29 -0400 Subject: [PATCH] Merge pull request #1711 in SNORT/snort3 from ~SHRARANG/snort3:appid_discovery_ut_fix to master Squashed commit of the following: commit dfbad8d2ee4434a1469deabf5ec2b9a5725ddbc4 Author: Shravan Rangaraju Date: Wed Aug 14 19:25:44 2019 -0400 appid: fix for discovery unit tests --- src/hash/xhash.cc | 2 +- src/network_inspectors/appid/test/appid_discovery_test.cc | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/hash/xhash.cc b/src/hash/xhash.cc index 7a521d661..0fcb2ce3f 100644 --- a/src/hash/xhash.cc +++ b/src/hash/xhash.cc @@ -1033,7 +1033,7 @@ static inline int xhash_delete_free_node(XHash *t) * t XHash table pointer * * returns - * XHASH_ERR if error occures + * XHASH_ERR if error occurs * XHASH_OK if node is freed */ int xhash_free_anr_lru(XHash *t) diff --git a/src/network_inspectors/appid/test/appid_discovery_test.cc b/src/network_inspectors/appid/test/appid_discovery_test.cc index d893805d5..756049974 100644 --- a/src/network_inspectors/appid/test/appid_discovery_test.cc +++ b/src/network_inspectors/appid/test/appid_discovery_test.cc @@ -348,6 +348,7 @@ TEST(appid_discovery_tests, event_published_when_processing_flow) p.pkth = &pkth; SfIp ip; p.ptrs.ip_api.set(ip, ip); + p.ptrs.tcph = nullptr; AppIdModule app_module; AppIdInspector ins(app_module); AppIdSession* asd = new AppIdSession(IpProtocol::TCP, nullptr, 21, ins); @@ -410,6 +411,7 @@ TEST(appid_discovery_tests, change_bits_for_non_http_appid) Flow* flow = new Flow; flow->set_flow_data(asd); p.flow = flow; + p.ptrs.tcph = nullptr; asd->config = &my_app_config; asd->common.initiator_port = 21; asd->common.initiator_ip.set("1.2.3.4"); -- 2.47.3