cr_config.h File Reference

Functions for load and save routing data from a config file.

More...

#include "cr_data.h"

Include dependency graph for cr_config.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int load_config (struct route_data_t *rd)
int save_config (struct route_data_t *rd)


Detailed Description

Functions for load and save routing data from a config file.

Definition in file cr_config.h.


Function Documentation

int load_config ( struct route_data_t rd  ) 

Loads the routing data from the config file given in global variable config_data and stores it in routing tree rd.

Parameters:
rd Pointer to the route data tree where the routing data shall be loaded into
Returns:
0 means ok, -1 means an error occured

Definition at line 182 of file cr_config.c.

References add_carrier_data(), add_route(), route_data_t::carrier_map, route_data_t::carrier_num, route_data_t::carriers, compare_name_map(), CR_EMPTY_PREFIX, create_carrier_data(), default_tree, destroy_carrier_data(), domain, route_data_t::domain_map, route_data_t::domain_num, route_data_t::first_empty_carrier, name_map_t::id, _str::len, LM_ERR, LM_INFO, map_name2id(), name_map_t::name, NULL, parse_config(), pkg_free, pkg_malloc, PKG_MEM_ERROR, prefix, _str::s, shm_malloc(), SHM_MEM_ERROR, and str_strcasecmp().

Referenced by reload_route_data(), and update_route_data().

int save_config ( struct route_data_t rd  ) 

Stores the routing data rd in config_file

Parameters:
rd Pointer to the routing tree which shall be saved to file
Returns:
0 means ok, -1 means an error occured

Definition at line 432 of file cr_config.c.

References backup_config(), route_data_t::carrier_num, route_data_t::carriers, config_file, carrier_data_t::domain_num, carrier_data_t::domains, _str::len, LM_ERR, domain_data_t::name, NULL, _str::s, save_route_data_recursor(), and domain_data_t::tree.

Referenced by update_route_data().


Generated on Mon May 21 18:00:38 2012 for Kamailio - The Open Source SIP Server by  doxygen 1.5.6