version 1.5, 2012/04/04 13:11:49
|
version 1.7, 2012/07/25 15:24:20
|
Line 154 cfgLoadConfig(const char *cfgName, cfg_root_t * __rest
|
Line 154 cfgLoadConfig(const char *cfgName, cfg_root_t * __rest
|
} |
} |
|
|
/* |
/* |
* cfgUnloadConfig() - Unload config from memory and free resources | * cfgClearConfig() - Clear config and free resources |
* |
* |
* @cfg = Config root |
* @cfg = Config root |
* return: none |
* return: none |
*/ |
*/ |
void |
void |
cfgUnloadConfig(cfg_root_t * __restrict cfg) | cfgClearConfig(cfg_root_t * __restrict cfg) |
{ |
{ |
struct tagCfg *av; |
struct tagCfg *av; |
|
|
Line 174 cfgUnloadConfig(cfg_root_t * __restrict cfg)
|
Line 174 cfgUnloadConfig(cfg_root_t * __restrict cfg)
|
AIT_FREE_VAL(&av->cfg_val); |
AIT_FREE_VAL(&av->cfg_val); |
AIT_FREE_VAL(&av->cfg_attr); |
AIT_FREE_VAL(&av->cfg_attr); |
AIT_FREE_VAL(&av->cfg_sec); |
AIT_FREE_VAL(&av->cfg_sec); |
free(av); | io_free(av); |
} |
} |
cfg->rbh_root = NULL; |
cfg->rbh_root = NULL; |
CFG_RC_UNLOCK(cfg); |
CFG_RC_UNLOCK(cfg); |
|
} |
|
|
|
/* |
|
* cfgUnloadConfig() - Unload config from memory and destroy resources |
|
* |
|
* @cfg = Config root |
|
* return: none |
|
*/ |
|
void |
|
cfgUnloadConfig(cfg_root_t * __restrict cfg) |
|
{ |
|
if (!cfg) |
|
return; |
|
|
|
cfgClearConfig(cfg); |
pthread_mutex_destroy(&cfg->rc_mtx); |
pthread_mutex_destroy(&cfg->rc_mtx); |
} |
} |
|
|