Ignore:
Timestamp:
Feb 25, 2010 11:58:19 AM (12 years ago)
Author:
nanang
Message:

More ticket #1032:

  • Updated transport state notification callback to return void.
  • Updated transport state enum to only contain connected and disconnected, no more bitmask value.
  • Added direction field to SIP transport.
  • Removed remote hostname hash from transport key.
  • Updated cert info dump to return -1 when buffer is insufficient.
  • Added new error code PJSIP_TLS_ECERTVERIF.
  • Updated get_cert_name() in ssl_sock_symbian.c to use heap buffer instead of stack.
  • Minors, e.g: added prefix PJ in cipher types, docs.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsip/sip_transport.c

    r3106 r3110  
    867867     * Register to hash table (see Trac ticket #42). 
    868868     */ 
    869     key_len = sizeof(tp->key.type) + sizeof(tp->key.hname) + tp->addr_len; 
     869    key_len = sizeof(tp->key.type) + tp->addr_len; 
    870870    pj_lock_acquire(mgr->lock); 
    871871 
     
    917917     * Unregister from hash table (see Trac ticket #42). 
    918918     */ 
    919     key_len = sizeof(tp->key.type) + sizeof(tp->key.hname) + tp->addr_len; 
     919    key_len = sizeof(tp->key.type) + tp->addr_len; 
    920920    hval = 0; 
    921921    entry = pj_hash_get(mgr->table, &tp->key, key_len, &hval); 
     
    15921592        pjsip_transport *transport; 
    15931593 
    1594         /* 
    1595          * Find factory that can create such transport. 
    1596          */ 
    1597         factory = mgr->factory_list.next; 
    1598         while (factory != &mgr->factory_list) { 
    1599             if (factory->type == type) 
    1600                 break; 
    1601             factory = factory->next; 
    1602         } 
    1603         if (factory == &mgr->factory_list) 
    1604             factory = NULL; 
    1605  
    16061594        pj_bzero(&key, sizeof(key)); 
    1607         key_len = sizeof(key.type) + sizeof(key.hname) + addr_len; 
     1595        key_len = sizeof(key.type) + addr_len; 
    16081596 
    16091597        /* First try to get exact destination. */ 
    16101598        key.type = type; 
    16111599        pj_memcpy(&key.rem_addr, remote, addr_len); 
    1612         if (factory && factory->create_transport2 &&  
    1613             tdata && tdata->dest_info.name.slen) 
    1614         { 
    1615             /* Only include hostname hash in the key when the factory support 
    1616              * create_transport2() and tdata is supplied. 
    1617              */ 
    1618             key.hname = pj_hash_calc_tolower(0,  
    1619                                     (char*)tdata->dest_info.name.ptr, 
    1620                                     &tdata->dest_info.name); 
    1621         } 
    16221600 
    16231601        transport = (pjsip_transport*) 
     
    16361614 
    16371615                pj_bzero(addr, addr_len); 
    1638                 key_len = sizeof(key.type) + sizeof(key.hname) + addr_len; 
     1616                key_len = sizeof(key.type) + addr_len; 
    16391617                transport = (pjsip_transport*)  
    16401618                            pj_hash_get(mgr->table, &key, key_len, NULL); 
     
    16491627                addr->addr.sa_family = remote_addr->addr.sa_family; 
    16501628 
    1651                 key_len = sizeof(key.type) + sizeof(key.hname) + addr_len; 
     1629                key_len = sizeof(key.type) + addr_len; 
    16521630                transport = (pjsip_transport*) 
    16531631                            pj_hash_get(mgr->table, &key, key_len, NULL); 
     
    16691647        /* 
    16701648         * Transport not found! 
     1649         * Find factory that can create such transport. 
    16711650         */ 
    1672         if (NULL == factory) { 
     1651        factory = mgr->factory_list.next; 
     1652        while (factory != &mgr->factory_list) { 
     1653            if (factory->type == type) 
     1654                break; 
     1655            factory = factory->next; 
     1656        } 
     1657 
     1658        if (factory == &mgr->factory_list) { 
    16731659            /* No factory can create the transport! */ 
    16741660            pj_lock_release(mgr->lock); 
     
    16781664    } 
    16791665 
    1680      
    16811666    TRACE_((THIS_FILE, "Creating new transport from factory")); 
    16821667 
Note: See TracChangeset for help on using the changeset viewer.