Changeset 738:d666051658bd in freeDiameter for extensions/rt_redirect/redir_out.c
- Timestamp:
- Mar 2, 2011, 6:21:59 PM (13 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/rt_redirect/redir_out.c
r717 r738 171 171 /* Special case: ALL_HOST rules: we decrease the score of the Origin-Host if present */ 172 172 if (e->type == ALL_HOST) { 173 cmp = fd_os_almostcase cmp(cand->diamid, cand->diamidlen, e->data.host.s, e->data.host.l);173 cmp = fd_os_almostcasesrch(cand->diamid, cand->diamidlen, e->data.host.s, e->data.host.l, NULL); 174 174 if (!cmp) { 175 175 TRACE_DEBUG(FULL, "Redirect msg %p: peer '%.*s' += %d (previous ALL_HOST Redirect originated from this peer)", msg, cand->diamidlen, cand->diamid, FD_SCORE_SENT_REDIRECT); … … 198 198 struct rtd_candidate * cand = (struct rtd_candidate *) lic; 199 199 200 /* Is this candidate in the "Redirect-Host" list ? */200 /* Is this candidate in the "Redirect-Host" list ? We must search caseinsentive here. */ 201 201 for (lirh = e->target_peers_list.next; lirh != &e->target_peers_list; lirh = lirh->next) { 202 202 struct redir_host * host = lirh->o; 203 204 cmp = fd_os_cmp( cand->diamid, cand->diamidlen, host->id, host->len ); 205 206 if (cmp < 0) 207 break; /* targets are ordered */ 203 int cont; 204 205 cmp = fd_os_almostcasesrch( cand->diamid, cand->diamidlen, host->id, host->len, &cont ); 208 206 209 207 if (cmp == 0) { 210 208 TRACE_DEBUG(FULL, "Redirect msg %p: peer '%.*s' += %d (rule t:%d @%p)", msg, cand->diamidlen, cand->diamid, redirects_usages[e->type].score, e->type, e); 211 209 cand->score += redirects_usages[e->type].score; 212 } 210 break; 211 } 212 if (!cont) 213 break; 213 214 } 214 215 }
Note: See TracChangeset
for help on using the changeset viewer.