X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fapcups.c;h=66fe45e119cda0c396da3bbb46e2012de1401687;hb=fb075e15e3400afdb691b88f1e1a4a38578aaba9;hp=773865344f48050201d090175b3416e9a97f23dc;hpb=d36acdd2311d0f847b270d4949f80109535c98ad;p=collectd.git diff --git a/src/apcups.c b/src/apcups.c index 77386534..66fe45e1 100644 --- a/src/apcups.c +++ b/src/apcups.c @@ -325,6 +325,9 @@ static int apc_query_server (char const *node, char const *service, printf ("net_recv = `%s';\n", recvline); #endif /* if APCMAIN */ + if (strncmp ("END APC", recvline, strlen ("END APC")) == 0) + break; + toksaveptr = NULL; tokptr = strtok_r (recvline, " :\t", &toksaveptr); while (tokptr != NULL)