Lines Matching refs:condition
71 static int CopyCondition(TriggerNode *node, const char *condition)
73 if (condition == NULL || strlen(condition) == 0) {
78 int ret = ConvertInfixToPrefix(condition, cond, buffSize);
79 PARAM_CHECK(ret == 0, return -1, "Failed to convert condition for trigger");
80 node->condition = strdup(cond);
81 PARAM_CHECK(node->condition != NULL, return -1, "Failed to dup conditition");
86 uint32_t type, const char *condition, uint32_t dataSize)
90 node->condition = NULL;
91 int ret = CopyCondition(node, condition);
115 const char *condition, const TriggerExtInfo *extInfo)
124 TriggerNode *node = (TriggerNode *)AddTriggerNode_(triggerHead, extInfo->type, condition, triggerNodeLen);
152 if (jobNode->condition != NULL) {
153 free(jobNode->condition);
154 jobNode->condition = NULL;
177 const char *condition, const TriggerExtInfo *extInfo)
192 TriggerNode *node = AddTriggerNode_(triggerHead, extInfo->type, condition, size);
218 if (trigger->condition != NULL) {
219 free(trigger->condition);
220 trigger->condition = NULL;
242 return (trigger == NULL || trigger->condition == NULL) ? "" : trigger->condition;
266 return trigger->condition;
270 int type, const char *condition, const char *name)
282 return (JobNode *)triggerHead->addTrigger(workSpace, condition, &extInfo);
283 } else if (jobNode->condition == NULL && condition != NULL) {
284 int ret = CopyCondition((TriggerNode *)jobNode, condition);
350 const char *condition, const char *content, uint32_t contentSize)
353 if (strncmp(condition, content, contentSize) == 0) {
360 const char *condition, const char *content, uint32_t contentSize)
364 if (strncmp(condition, content, strlen(condition)) == 0) {
371 const char *condition, const char *content, uint32_t contentSize)
376 if (!CheckMatchSubCondition(condition, calculator->inputName, strlen(calculator->inputName))) {
380 return ComputeCondition(calculator, condition);
384 const char *condition, const char *content, uint32_t contentSize)
386 if (condition != NULL && content != NULL && strcmp(content, condition) == 0) {
389 return ComputeCondition(calculator, condition);
400 const char *condition = head->getCondition(trigger);
401 if (head->checkCondition(calculator, condition, content, contentSize) == 1) {
489 PARAM_DUMP("trigger condition: %s \n", node->condition);
507 PARAM_DUMP("trigger condition: %s \n", trigger->condition);
517 PARAM_DUMP("trigger condition: %s \n", trigger->condition);