--- web/svcstatus.c.trendsloop 2012-04-25 17:53:25.061120432 -0700 +++ web/svcstatus.c 2012-04-26 11:36:41.797944765 -0700 @@ -40,6 +40,7 @@ static char *hostname = NULL; static char *service = NULL; static char *tstamp = NULL; +static char *skiploc = NULL; static char *nkprio = NULL, *nkttgroup = NULL, *nkttextra = NULL; static enum { FRM_STATUS, FRM_CLIENT } outform = FRM_STATUS; static char *clienturi = NULL; @@ -106,6 +107,9 @@ else if (strcasecmp(cwalk->name, "NKTTEXTRA") == 0) { nkttextra = strdup(cwalk->value); } + else if ((strcasecmp(cwalk->name, "SKIPLOC") == 0) && cwalk->value && strlen(cwalk->value) && (strcmp(cwalk->value, "1") == 0)) { + skiploc = strdup(cwalk->value); + } else if ((strcmp(cwalk->name, "backsecs") == 0) && cwalk->value && strlen(cwalk->value)) { backsecs += atoi(cwalk->value); } @@ -276,7 +280,7 @@ strcpy(timesincechange, "0 minutes"); if (strcmp(service, xgetenv("TRENDSCOLUMN")) == 0) { - if (locatorbased) { + if (locatorbased && !skiploc) { char *cgiurl, *qres; qres = locator_query(hostname, ST_RRD, &cgiurl); @@ -285,7 +289,7 @@ } else { /* Redirect browser to the real server */ - fprintf(stdout, "Location: %s/svcstatus.sh?HOST=%s&SERVICE=%s\n\n", + fprintf(stdout, "Location: %s/svcstatus.sh?HOST=%s&SERVICE=%s&SKIPLOC=1\n\n", cgiurl, hostname, service); return 0; } @@ -657,6 +661,7 @@ if (hostname) xfree(hostname); if (service) xfree(service); if (tstamp) xfree(tstamp); + if (skiploc) xfree(skiploc); /* Cleanup main vars */ if (clientid) xfree(clientid); @@ -739,5 +741,5 @@ *errortxt = '\0'; - hostname = service = tstamp = NULL; + hostname = service = tstamp = skiploc = NULL; if (do_request() != 0) { fprintf(stdout, "%s", errortxt);