bbcombotest patch
list Cade Robinson
Thu, 04 Mar 2010 11:39:35 -0600
Message-Id: <user-ff3cc7532894@xymon.invalid>
I found that bbcombotest didn't work for hostnames starting with a
number.
My fix: (this is on the 4.4.0 branch)
@@ -295,13 +291,10 @@
done = 0; inp=symbolicexpr; outp=expr; symp = NULL;
while (!done) {
- if (isalpha((int)*inp)) {
+ if (isalpha((int)*inp) || isdigit((int) *inp) || *inp == '.') {
if (!insymbol) { insymbol = 1; symp = symbol; }
*symp = *inp; symp++;
}
- else if (insymbol && (isdigit((int) *inp) || (*inp ==
'.'))) {
- *symp = *inp; symp++;
- }
else if (insymbol && ((*inp == '\\') && (*(inp+1) > '
'))) {
*symp = *(inp+1); symp++; inp++;
}