Changeset 4615


Ignore:
Timestamp:
Oct 8, 2013 11:14:42 AM (11 years ago)
Author:
bennylp
Message:

Re #1703 General bug fixes: fixed some wrong null checking order

Location:
pjproject/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjnath/src/pjnath/stun_msg.c

    r4613 r4615  
    11381138                                              const pj_str_t *value) 
    11391139{ 
    1140     INIT_ATTR(attr, attr_type, value->slen); 
    1141     if (value && value->slen) 
     1140    INIT_ATTR(attr, attr_type, 0); 
     1141    if (value && value->slen) { 
     1142        attr->value.slen = value->slen; 
    11421143        pj_strdup(pool, &attr->value, value); 
    1143     else 
    1144         attr->value.slen = 0; 
     1144    } 
    11451145    return PJ_SUCCESS; 
    11461146} 
  • pjproject/trunk/pjnath/src/pjnath/stun_sock.c

    r4606 r4615  
    212212        stun_sock->ka_interval = PJ_STUN_KEEP_ALIVE_SEC; 
    213213 
    214     if (cfg && cfg->grp_lock) { 
     214    if (cfg->grp_lock) { 
    215215        stun_sock->grp_lock = cfg->grp_lock; 
    216216    } else { 
  • pjproject/trunk/pjsip/src/pjsip/sip_transport.c

    r4537 r4615  
    578578PJ_DEF(char*) pjsip_tx_data_get_info( pjsip_tx_data *tdata ) 
    579579{ 
     580    PJ_ASSERT_RETURN(tdata, "NULL"); 
     581 
    580582    /* tdata->info may be assigned by application so if it exists 
    581583     * just return it. 
     
    584586        return tdata->info; 
    585587 
    586     if (tdata==NULL || tdata->msg==NULL) 
     588    if (tdata->msg==NULL) 
    587589        return "NULL"; 
    588590 
Note: See TracChangeset for help on using the changeset viewer.