if (config != NULL) {
// if not, create default device config
type = config->get_cfg_value(DEVICE_CONFIG_VALUE_KEY__TYPE);
if (type.empty() == true) {
if (config != NULL) {
// if not, create default device config
type = config->get_cfg_value(DEVICE_CONFIG_VALUE_KEY__TYPE);
if (type.empty() == true) {
config->set_cfg_value(DEVICE_CONFIG_VALUE_KEY__TYPE, type);
config->set_cfg_value(DEVICE_CONFIG_VALUE_KEY__ID, ret_val->get_id());
}
config->set_cfg_value(DEVICE_CONFIG_VALUE_KEY__TYPE, type);
config->set_cfg_value(DEVICE_CONFIG_VALUE_KEY__ID, ret_val->get_id());
}
direntry = readdir(dir);
while(direntry != NULL) {
if (strcmp(direntry->d_name, "cache") != 0) {
direntry = readdir(dir);
while(direntry != NULL) {
if (strcmp(direntry->d_name, "cache") != 0) {