Navigation


Changeset 166:6d166f75e25a in freeDiameter


Ignore:
Timestamp:
Jan 28, 2010, 3:01:50 PM (14 years ago)
Author:
Sebastien Decugis <sdecugis@nict.go.jp>
Branch:
default
Phase:
public
Message:

Fix routing list scores initialization

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/dbg_rt/dbg_rt.c

    r120 r166  
    6464        fd_log_debug("[dbg_rt] OUT routing message: %p\n", msg);
    6565        fd_msg_dump_walk(INFO, msg);
    66         fd_log_debug("[dbg_rt] Current list of candidates (%p)\n", msg);
     66        fd_log_debug("[dbg_rt] Current list of candidates (%p): (score - id)\n", msg);
    6767       
    6868        for (li = candidates->next; li != candidates; li = li->next) {
    6969                struct rtd_candidate *c = (struct rtd_candidate *) li;
    70                 fd_log_debug("[dbg_rt]   - %d\t%s\n", c->score, c->diamid);
     70                fd_log_debug("[dbg_rt]   %d -\t%s\n", c->score, c->diamid);
    7171        }
    7272       
  • libfreeDiameter/rt_data.c

    r124 r166  
    226226}
    227227
    228 /* Extract the list of valid candidates, and initialize their scores to 0 */
     228/* Extract the list of valid candidates, and initialize their scores */
    229229void fd_rtd_candidate_extract(struct rt_data * rtd, struct fd_list ** candidates, int ini_score)
    230230{
     231        struct fd_list * li;
     232       
    231233        TRACE_ENTRY("%p %p", rtd, candidates);
    232234        CHECK_PARAMS_DO( candidates, return );
     
    235237        *candidates = &rtd->candidates;
    236238       
    237         if (rtd->extracted) {
    238                 /* Reset all scores to INITIAL score */
    239                 struct fd_list * li;
    240                 for (li = rtd->candidates.next; li != &rtd->candidates; li = li->next) {
    241                         struct rtd_candidate * c = (struct rtd_candidate *) li;
    242                         c->score = ini_score;
    243                 }
     239        /* Reset all scores to INITIAL score */
     240        for (li = rtd->candidates.next; li != &rtd->candidates; li = li->next) {
     241                struct rtd_candidate * c = (struct rtd_candidate *) li;
     242                c->score = ini_score;
    244243        }
    245244       
Note: See TracChangeset for help on using the changeset viewer.