Mercurial > hg > freeDiameter
diff extensions/dict_dcca_3gpp/dict_dcca_3gpp.c @ 1436:ad50ef2eddea
dbg_dict_dump: new extension to dump dictionary when loaded
Add extension dbg_dict_dump to log the dictionary when loaded.
Remove debug code in extension dict_dcca_3gpp to log the vendor
dictionary if the config file is the word "dumpdict" that
I added on 2020-02-19.
author | Luke Mewburn <luke@mewburn.net> |
---|---|
date | Tue, 25 Feb 2020 09:45:15 +1100 |
parents | 4bd30996ad7f |
children | d6469b0f2111 |
line wrap: on
line diff
--- a/extensions/dict_dcca_3gpp/dict_dcca_3gpp.c Wed Feb 19 18:12:45 2020 +1100 +++ b/extensions/dict_dcca_3gpp/dict_dcca_3gpp.c Tue Feb 25 09:45:15 2020 +1100 @@ -144,14 +144,12 @@ static int dict_dcca_3gpp_entry(char * conffile) { - struct dict_object * vendor = NULL; - /* Applications section */ { /* Create the vendors */ { struct dict_vendor_data vendor_data = { 10415, "3GPP" }; - CHECK_FCT(fd_dict_new(fd_g_config->cnf_dict, DICT_VENDOR, &vendor_data, NULL, &vendor)); + CHECK_FCT(fd_dict_new(fd_g_config->cnf_dict, DICT_VENDOR, &vendor_data, NULL, NULL)); } { struct dict_vendor_data vendor_data = { 5535, "3GPP2" }; @@ -10898,12 +10896,6 @@ PARSE_loc_rules(rules, rule_avp); } - if (conffile && (0 == strcmp(conffile, "dumpdict"))) { - char * tbuf = NULL; size_t tbuflen = 0; - LOG_D("dict_dcca_3gpp dictionary: %s", fd_dict_dump_object(&tbuf, &tbuflen, NULL, vendor)); - free(tbuf); - } - LOG_D( "Extension 'Dictionary definitions for DCCA 3GPP' initialized"); return 0; }