src/hg/qa/apacheMonitor.c 1.14
1.14 2009/03/02 17:53:06 angie
Some fields can be null -- added checks.
Index: src/hg/qa/apacheMonitor.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/qa/apacheMonitor.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -b -B -U 4 -r1.13 -r1.14
--- src/hg/qa/apacheMonitor.c 26 Feb 2009 17:45:48 -0000 1.13
+++ src/hg/qa/apacheMonitor.c 2 Mar 2009 17:53:06 -0000 1.14
@@ -206,14 +206,18 @@
{
status = sqlUnsigned(row[2]);
logStatus(status);
logMachine(row[1]);
- if (sameString(row[7], "-")) robotcount++;
+ if (isEmpty(row[7]) || sameString(row[7], "-")) robotcount++;
total++;
if (status == 500 && write500)
+ {
+ if (row[6] == NULL) row[6] = "";
+ if (row[7] == NULL) row[7] = "";
fprintf(outputFileHandle, "%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n",
row[0], row[1], row[3], row[4], row[5], row[6], row[7], row[8]);
}
+ }
sqlFreeResult(&sr);
if (write500) carefulClose(&outputFileHandle);
}