# HG changeset patch # User Luke Mewburn # Date 1582255816 -39600 # Node ID 7c60cb0ac8c85f58e762b0d2e3b9aaae99250658 # Parent 0a80278df21f59476cc284d485f70bf1869951be testmesg: improve comments and msg cleanup diff -r 0a80278df21f -r 7c60cb0ac8c8 tests/testmesg.c --- a/tests/testmesg.c Thu Feb 20 15:46:20 2020 +1100 +++ b/tests/testmesg.c Fri Feb 21 14:30:16 2020 +1100 @@ -164,6 +164,8 @@ /* Create the instance, using the templates */ CHECK( 0, fd_msg_new ( acr_model, 0, &acr ) ); + +/* TODO: Do we need this recreated? acr is not used again . */ } /* Now let's create some additional Dictionary objects for the test */ @@ -700,7 +702,7 @@ struct avp * grouped = NULL; struct avp_hdr * avpdata = NULL; - /* Now find the ACR dictionary object */ + /* Now find the Test f32 AVP dictionary object */ CHECK( 0, fd_dict_search ( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "AVP Test - no vendor - f32", &avp_model, ENOENT ) ); CPYBUF(); @@ -1115,6 +1117,8 @@ fd_log_debug("%s", fd_msg_dump_treeview(FD_DUMP_TEST_PARAMS, msg, fd_g_config->cnf_dict, 0, 1)); TODO("Check the Failed-AVP is as expected"); + + CHECK( 0, fd_msg_free( msg ) ); } } @@ -1509,7 +1513,7 @@ CHECK( 0, fd_msg_new ( cmd_model, 0, &msg ) ); /* Add a session id */ - CHECK( 0, fd_msg_new_session( msg, (os0_t)"tm2", strlen("tm2") ) ); + CHECK( 0, fd_msg_new_session( msg, (os0_t)"testmsg", strlen("testmsg") ) ); /* Find the DICT_TYPE Enumerated(Result-Code) */ struct dict_object * restype = NULL; @@ -1553,7 +1557,7 @@ CHECK( 0, fd_msg_new ( cmd_model, 0, &msg ) ); /* Add a session id */ - CHECK( 0, fd_msg_new_session( msg, (os0_t)"tm2", strlen("tm2") ) ); + CHECK( 0, fd_msg_new_session( msg, (os0_t)"testmsg", strlen("testmsg") ) ); /* Find the DICT_TYPE Enumerated(73565/Experimental-Result-Code) */ struct dict_object * restype = NULL;