Navigation


Changeset 545:b0f9b0e1b564 in freeDiameter


Ignore:
Timestamp:
Sep 14, 2010, 4:14:52 PM (14 years ago)
Author:
Sebastien Decugis <sdecugis@nict.go.jp>
Branch:
default
Phase:
public
Message:

Fix invalid initialization

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/app_radgw/rgw_clients.c

    r544 r545  
    137137/* The core of the purge thread */
    138138static int dupl_purge_list(struct fd_list * clients) {
     139
    139140        struct fd_list *li = NULL;
     141       
    140142        for (li = clients->next; li != clients; li = li->next) {
    141143                struct rgw_client * client = (struct rgw_client *)li;
    142144                int p;
     145               
    143146                for (p=0; p<=1; p++) {
     147               
    144148                        /* Lock this list */
    145149                        time_t now;
     
    149153                       
    150154                        while (!FD_IS_LIST_EMPTY(&client->dupl_info[p].dupl_by_time)) {
     155                       
    151156                                /* Check the first item in the list */
    152157                                struct req_info * r = (struct req_info *)(client->dupl_info[p].dupl_by_time.next->o);
     
    228233        /* Initialize the duplicate list info */
    229234        for (i=0; i<=1; i++) {
    230                 CHECK_POSIX( pthread_mutex_init(&tmp->dupl_info[0].dupl_lock, NULL) );
    231                 fd_list_init(&tmp->dupl_info[0].dupl_by_id, NULL);
    232                 fd_list_init(&tmp->dupl_info[0].dupl_by_time, NULL);
     235                CHECK_POSIX( pthread_mutex_init(&tmp->dupl_info[i].dupl_lock, NULL) );
     236                fd_list_init(&tmp->dupl_info[i].dupl_by_id, NULL);
     237                fd_list_init(&tmp->dupl_info[i].dupl_by_time, NULL);
    233238        }
    234239        tmp->type = type;
Note: See TracChangeset for help on using the changeset viewer.