70 while ((str = strtok_r(str ? NULL : data,
"\n", &saveptr))) {
72 if (strcmp(str + strlen(
STATUS_STR),
"OK") == 0) {
78 unsigned long v_maj = 0;
79 unsigned long v_min = 0;
80 unsigned long v_pat = 0;
83 if (sscanf(str,
"%lu.%lu.%lu", &v_maj, &v_min, &v_pat) == 0) {
84 DBG_ERR(
"Unable to parse version string");
97 pid = strtoul(str, &endptr, 0);
98 if ((errno == ERANGE && pid == ULONG_MAX) || (errno != 0 && pid == 0)) {
102 if (endptr == str || pid == 0) {
106 connector->
pid = pid;
109 sizeof(connector->
address) - 1);
116 port = strtoul(str, &endptr, 0);
117 if ((errno == ERANGE && port == ULONG_MAX) || (errno != 0 && port == 0)) {
121 if (endptr == str || port == 0) {
125 connector->
port = port;
129 DBG_INFO(
"response from connector");