diff options
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/msg.c | 4 | ||||
-rw-r--r-- | runtime/msg.h | 5 | ||||
-rw-r--r-- | runtime/ruleset.c | 2 |
3 files changed, 3 insertions, 8 deletions
diff --git a/runtime/msg.c b/runtime/msg.c index 3690a8b4..c9ac507e 100644 --- a/runtime/msg.c +++ b/runtime/msg.c @@ -4068,9 +4068,9 @@ msgSetJSONFromVar(msg_t *pMsg, uchar *varname, struct var *v) ABORT_FINALIZE(RS_RET_ERR); } /* we always know strlen(varname) > 2 */ - if(varname[1] == '!') + if(varname[0] == '!') msgAddJSONObj(pMsg, varname+1, json, &pMsg->json); - else if(varname[1] == '.') + else if(varname[0] == '.') msgAddJSONObj(pMsg, varname+1, json, &pMsg->localvars); else { /* global - '/' */ pthread_rwlock_wrlock(&glblVars_rwlock); diff --git a/runtime/msg.h b/runtime/msg.h index fd890822..a2392a20 100644 --- a/runtime/msg.h +++ b/runtime/msg.h @@ -217,11 +217,6 @@ rsRetVal jsonFind(struct json_object *jroot, msgPropDescr_t *pProp, struct json_ rsRetVal msgPropDescrFill(msgPropDescr_t *pProp, uchar *name, int nameLen); void msgPropDescrDestruct(msgPropDescr_t *pProp); -static inline rsRetVal -msgUnsetJSON(msg_t *pMsg, uchar *varname) { - return msgDelJSON(pMsg, varname+1); -} - static inline int msgGetProtocolVersion(msg_t *pM) { diff --git a/runtime/ruleset.c b/runtime/ruleset.c index b7055eac..15e9e5ea 100644 --- a/runtime/ruleset.c +++ b/runtime/ruleset.c @@ -261,7 +261,7 @@ execUnset(struct cnfstmt *stmt, batch_t *pBatch, sbool *active) for(i = 0 ; i < batchNumMsgs(pBatch) && !*(pBatch->pbShutdownImmediate) ; ++i) { if( pBatch->eltState[i] != BATCH_STATE_DISC && (active == NULL || active[i])) { - msgUnsetJSON(pBatch->pElem[i].pMsg, stmt->d.s_unset.varname); + msgDelJSON(pBatch->pElem[i].pMsg, stmt->d.s_unset.varname); } } RETiRet; |