purple hosts - better fix
list Cade Robinson
Wed, 17 Feb 2010 10:30:45 -0600
Message-Id: <user-57e4c3d4e627@xymon.invalid>
I think this is a better fix for purple hosts.
I was thinking about why there was the while loop and I am guessing
there could be a duration like: 1d4h10m
So with that I left the while loop in and at the end of the block where
startofval is set if *p I changed the test since space counts as a valid
char for *p.
This is in the 4.4.0 branch so the line numbers may not match for other
source versions.
Index: lib/timefunc.c
===================================================================
--- lib/timefunc.c (revision 6223)
+++ lib/timefunc.c (working copy)
@@ -475,7 +475,7 @@
}
result += oneval;
- startofval = ((*p) ? p+1 : NULL);
+ startofval = ((*p) ? ((isspace((int)*p)) ? NULL : p+1) :
NULL );
}
return result;