static ret_t match (cherokee_rule_t *rule, cherokee_connection_t *conn, cherokee_config_entry_t *ret_conf) { ret_t ret; /* Evaluate the left side. If it does not match do not even * try to evaluate the right part. */ ret = cherokee_rule_match (RULE_AND(rule)->left, conn, ret_conf); if (ret != ret_ok) return ret; /* It matched, it is time for the right side */ return cherokee_rule_match (RULE_AND(rule)->right, conn, ret_conf); }
static ret_t match (cherokee_rule_t *rule, cherokee_connection_t *conn, cherokee_config_entry_t *ret_conf) { ret_t ret; /* Call match() in the subrule and invert the result */ ret = cherokee_rule_match (RULE_NOT(rule)->right, conn, ret_conf); switch (ret) { case ret_ok: return ret_not_found; case ret_not_found: return ret_ok; case ret_error: return ret_error; default: RET_UNKNOWN(ret); return ret_error; } }