- json_object *jo, *canbus;
- const char* taxi;
-
- jo = json_tokener_parse(config_content_.c_str());
-
- if (jo == NULL || !json_object_object_get_ex(jo, "canbus", &canbus))
- {
- ERROR(binder_interface, "Can't find canbus node in the configuration file. Please review it.");
- devices_name_.clear();
- }
- else if (json_object_get_type(canbus) != json_type_array)
- {
- taxi = json_object_get_string(canbus);
- DEBUG(binder_interface, "Can bus found: %s", taxi);
- devices_name_.push_back(std::string(taxi));
- }
- else
- {
- int n, i;
- n = json_object_array_length(canbus);
- for (i = 0 ; i < n ; i++)
- devices_name_.push_back(json_object_get_string(json_object_array_get_idx(canbus, i)));
- }
+ if (config_content_.size() <= 0)
+ {
+ ERROR(binder_interface, "%s: Can't load the INI config file.", __FUNCTION__);
+ return false;
+ }
+ DEBUG(binder_interface, "%s: Configuration file parsed", __FUNCTION__);
+ return true;