Navigation


Changeset 1436:ad50ef2eddea in freeDiameter for extensions


Ignore:
Timestamp:
Feb 25, 2020, 7:45:15 AM (4 years ago)
Author:
Luke Mewburn <luke@mewburn.net>
Branch:
default
Phase:
public
Message:

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.

Location:
extensions
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/CMakeLists.txt

    r1374 r1436  
    8989# Debug & test extensions
    9090
     91FD_EXTENSION_SUBDIR(dbg_dict_dump   "Log dictionary dump"                            ON)
    9192FD_EXTENSION_SUBDIR(dbg_loglevel "Read loglevel from file -- allows runtime change"  ON)
    9293FD_EXTENSION_SUBDIR(dbg_monitor     "Outputs periodical status information"              ON)
  • extensions/dict_dcca_3gpp/dict_dcca_3gpp.c

    r1435 r1436  
    145145static int dict_dcca_3gpp_entry(char * conffile)
    146146{
    147         struct dict_object * vendor = NULL;
    148 
    149147        /* Applications section */
    150148        {               
     
    152150                {
    153151                        struct dict_vendor_data vendor_data = { 10415, "3GPP" };
    154                         CHECK_FCT(fd_dict_new(fd_g_config->cnf_dict, DICT_VENDOR, &vendor_data, NULL, &vendor));
     152                        CHECK_FCT(fd_dict_new(fd_g_config->cnf_dict, DICT_VENDOR, &vendor_data, NULL, NULL));
    155153                }
    156154                {
     
    1089910897        }
    1090010898
    10901         if (conffile && (0 == strcmp(conffile, "dumpdict")))  {
    10902                 char * tbuf = NULL; size_t tbuflen = 0;
    10903                 LOG_D("dict_dcca_3gpp dictionary: %s", fd_dict_dump_object(&tbuf, &tbuflen, NULL, vendor));
    10904                 free(tbuf);
    10905         }
    10906 
    1090710899        LOG_D( "Extension 'Dictionary definitions for DCCA 3GPP' initialized");
    1090810900        return 0;
Note: See TracChangeset for help on using the changeset viewer.