Ignore:
Timestamp:
Mar 20, 2008 4:32:06 PM (17 years ago)
Author:
bennylp
Message:

More ticket #485: client and server self tested

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjnath/src/pjturn-srv/server.c

    r1877 r1879  
    136136    /* Init ports settings */ 
    137137    srv->ports.min_udp = srv->ports.next_udp = MIN_PORT; 
    138     srv->ports.max_tcp = MAX_PORT; 
     138    srv->ports.max_udp = MAX_PORT; 
    139139    srv->ports.min_tcp = srv->ports.next_tcp = MIN_PORT; 
    140140    srv->ports.max_tcp = MAX_PORT; 
     
    266266    } 
    267267 
     268    /* Destroy all allocations FIRST */ 
     269    if (srv->tables.alloc) { 
     270        it = pj_hash_first(srv->tables.alloc, &itbuf); 
     271        while (it != NULL) { 
     272            pj_turn_allocation *alloc = (pj_turn_allocation*) 
     273                                        pj_hash_this(srv->tables.alloc, it); 
     274            pj_hash_iterator_t *next = pj_hash_next(srv->tables.alloc, it); 
     275            pj_turn_allocation_destroy(alloc); 
     276            it = next; 
     277        } 
     278    } 
     279     
    268280    /* Destroy all listeners and STUN sessions associated with them. */ 
    269281    for (i=0; i<srv->core.lis_cnt; ++i) { 
     
    277289        } 
    278290    } 
    279  
    280     /* Destroy all allocations */ 
    281     if (srv->tables.alloc) { 
    282         it = pj_hash_first(srv->tables.alloc, &itbuf); 
    283         while (it != NULL) { 
    284             pj_turn_allocation *alloc = (pj_turn_allocation*) 
    285                                         pj_hash_this(srv->tables.alloc, it); 
    286             pj_turn_allocation_destroy(alloc); 
    287             it = pj_hash_next(srv->tables.alloc, it); 
    288         } 
    289     } 
    290      
    291291 
    292292    /* Destroy hash tables (well, sort of) */ 
Note: See TracChangeset for help on using the changeset viewer.