From a6b2327c40bf3180011a53164cdff230944bf79c Mon Sep 17 00:00:00 2001 From: onefang Date: Thu, 19 Mar 2020 21:58:18 +1000 Subject: qtreetbl doesn't have a put and get int, and I may want to switch to it. --- src/sledjchisl/sledjchisl.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/sledjchisl/sledjchisl.c b/src/sledjchisl/sledjchisl.c index 8dfbb94..f87e44f 100644 --- a/src/sledjchisl/sledjchisl.c +++ b/src/sledjchisl/sledjchisl.c @@ -3167,12 +3167,12 @@ boolean badBoy(int ret, reqData *Rd, qhashtbl_t *data, char *name, char *value) value = getStrH(data, name); if (0 != ret) { - Rd->valid->putint(Rd->valid, name, -1); + Rd->valid->putstr(Rd->valid, name, "-1"); W("Bad boy %s = %s", name, value); return TRUE; } Rd->stuff->putstr(Rd->stuff, name, value); - Rd->valid->putint(Rd->valid, name, 1); + Rd->valid->putstr(Rd->valid, name, "1"); return FALSE; } @@ -3190,10 +3190,13 @@ int validateThings(reqData *Rd, char *doit, char *name, qhashtbl_t *things) if (NULL != t) { - char *nm = obj.name; - int valid = Rd->valid->getint(Rd->valid, nm); + char *nm = obj.name, *v = Rd->valid->getstr(Rd->valid, nm, false); + int valid = 0; validFunc *vf = (validFunc *) obj.data; + if (NULL != v) + valid = atoi(v); + if (0 != valid) // Is it in the valid qhashtbl? { if (0 < valid) // Positive valid means it's valid, negative means it's invald. -- cgit v1.1