aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/sledjchisl/sledjchisl.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/sledjchisl/sledjchisl.c11
1 files changed, 7 insertions, 4 deletions
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)
3167 value = getStrH(data, name); 3167 value = getStrH(data, name);
3168 if (0 != ret) 3168 if (0 != ret)
3169 { 3169 {
3170 Rd->valid->putint(Rd->valid, name, -1); 3170 Rd->valid->putstr(Rd->valid, name, "-1");
3171W("Bad boy %s = %s", name, value); 3171W("Bad boy %s = %s", name, value);
3172 return TRUE; 3172 return TRUE;
3173 } 3173 }
3174 Rd->stuff->putstr(Rd->stuff, name, value); 3174 Rd->stuff->putstr(Rd->stuff, name, value);
3175 Rd->valid->putint(Rd->valid, name, 1); 3175 Rd->valid->putstr(Rd->valid, name, "1");
3176 return FALSE; 3176 return FALSE;
3177} 3177}
3178 3178
@@ -3190,10 +3190,13 @@ int validateThings(reqData *Rd, char *doit, char *name, qhashtbl_t *things)
3190 3190
3191 if (NULL != t) 3191 if (NULL != t)
3192 { 3192 {
3193 char *nm = obj.name; 3193 char *nm = obj.name, *v = Rd->valid->getstr(Rd->valid, nm, false);
3194 int valid = Rd->valid->getint(Rd->valid, nm); 3194 int valid = 0;
3195 validFunc *vf = (validFunc *) obj.data; 3195 validFunc *vf = (validFunc *) obj.data;
3196 3196
3197 if (NULL != v)
3198 valid = atoi(v);
3199
3197 if (0 != valid) // Is it in the valid qhashtbl? 3200 if (0 != valid) // Is it in the valid qhashtbl?
3198 { 3201 {
3199 if (0 < valid) // Positive valid means it's valid, negative means it's invald. 3202 if (0 < valid) // Positive valid means it's valid, negative means it's invald.