- ctx = uci_alloc_context();
- if (ctx != NULL) {
- log_debug("uci_set_confdir: %s\n", cfg_dir.c_str());
- uci_set_confdir(ctx, cfg_dir.c_str());
- if (access(cfg_fl.c_str(), R_OK) == 0) {
+ if (access(cfg_fl.c_str(), R_OK) == 0) {
+ ctx = uci_alloc_context();
+ if (ctx != NULL) {
+ log_debug("uci_set_confdir: %s\n", cfg_dir.c_str());
+ uci_set_confdir(ctx, cfg_dir.c_str());