std::vector<std::string> ret;
json_object *jo, *canbus;
int n, i;
+ const char* taxi;
FILE *fd = fdopen(conf_file_, "r");
if (fd)
std::fread(&fd_conf_content[0], 1, fd_conf_content.size(), fd);
std::fclose(fd);
+ DEBUG(binder_interface, "Conf file content : %s", fd_conf_content.c_str());
jo = json_tokener_parse(fd_conf_content.c_str());
if (jo == NULL || !json_object_object_get_ex(jo, "canbus", &canbus))
ret.clear();
}
else if (json_object_get_type(canbus) != json_type_array)
- ret.push_back(json_object_get_string(canbus));
+ {
+ taxi = json_object_get_string(canbus);
+ DEBUG(binder_interface, "Can bus found: %s", taxi);
+ ret.push_back(taxi);
+ }
else
{
n = json_object_array_length(canbus);