From 785152a364d57c05540f4b685b053603204b8b87 Mon Sep 17 00:00:00 2001 From: Jonathan Bennett Date: Fri, 22 Jan 2016 22:37:36 -0600 Subject: [PATCH] Modify server/access.c CUnit test to use the correct function. add_port_list_ent() only supports one protocol/port entry at a time. The second entry was ignored. --- server/access.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/access.c b/server/access.c index 0f76c38e..acea6e38 100644 --- a/server/access.c +++ b/server/access.c @@ -2457,9 +2457,9 @@ DECLARE_UTEST(compare_port_list, "check compare_port_list function") /* Match any test */ free_acc_port_list(in1_pl); free_acc_port_list(acc_pl); - add_port_list_ent(&in1_pl, "udp/6002"); - add_port_list_ent(&in2_pl, "udp/6002, udp/6003"); - add_port_list_ent(&acc_pl, "udp/6002, udp/6003"); + expand_acc_port_list(&in1_pl, "udp/6002"); + expand_acc_port_list(&in2_pl, "udp/6002, udp/6003"); + expand_acc_port_list(&acc_pl, "udp/6002, udp/6003"); CU_ASSERT(compare_port_list(in1_pl, acc_pl, 1) == 1); /* Only one match is needed from access port list - 1 */ CU_ASSERT(compare_port_list(in2_pl, acc_pl, 1) == 1); /* Only match is needed from access port list - 2 */ CU_ASSERT(compare_port_list(in1_pl, acc_pl, 0) == 1); /* All ports must match access port list - 1 */