Changeset 1179:f5e9b53d6f86 in freeDiameter for extensions
- Timestamp:
- Jun 4, 2013, 7:41:07 PM (11 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/rt_default/rtd_rules.c
r1127 r1179 414 414 415 415 TRACE_ENTRY("%d %p %d %p %d %x", ct, criteria, tt, target, score, flags); 416 CHECK_PARAMS((ct < RTD_CRI_MAX) && ((ct == 0) || criteria) && (tt < RTD_TAR_MAX) && target);416 CHECK_PARAMS((ct < RTD_CRI_MAX) && ((ct == RTD_CRI_ALL) || criteria) && (tt < RTD_TAR_MAX) && target); 417 417 418 418 /* First, search in the TARGET list if we already have this target */ … … 451 451 452 452 /* Now, search for the rule position in this target's list */ 453 if (ct == 0) {453 if (ct == RTD_CRI_ALL) { 454 454 /* Special case: we don't have a criteria -- always create a rule element */ 455 455 CHECK_MALLOC( rul = new_rule(NULL, 0, score) ); 456 fd_list_insert_before( &trg->rules[ 0], &rul->chain );456 fd_list_insert_before( &trg->rules[RTD_CRI_ALL], &rul->chain ); 457 457 } else { 458 458 for (rule_suiv = trg->rules[ct].next; rule_suiv != &trg->rules[ct]; rule_suiv = rule_suiv->next) { … … 536 536 537 537 /* First, apply all rules of criteria RTD_CRI_ALL */ 538 for ( l = target->rules[ 0].next; l != &target->rules[0]; l = l->next ) {538 for ( l = target->rules[RTD_CRI_ALL].next; l != &target->rules[RTD_CRI_ALL]; l = l->next ) { 539 539 r = (struct rule *)l; 540 540 cand->score += r->score; 541 TRACE_DEBUG(ANNOYING, "Applied rule {' %s' : '%s' += %d} to candidate '%s'", r->md.plain, target->md.plain, r->score, cand->diamid);541 TRACE_DEBUG(ANNOYING, "Applied rule {'*' : '%s' += %d} to candidate '%s'", target->md.plain, r->score, cand->diamid); 542 542 } 543 543
Note: See TracChangeset
for help on using the changeset viewer.