Ignore:
Timestamp:
Jun 28, 2007 2:47:32 AM (17 years ago)
Author:
bennylp
Message:

Ticket #349: Crash when sending PUBLISH when network is unreachable

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_pres.c

    r1396 r1398  
    700700 
    701701on_error: 
    702     pjsip_publishc_destroy(acc->publish_sess); 
    703     acc->publish_sess = NULL; 
     702    if (acc->publish_sess) { 
     703        pjsip_publishc_destroy(acc->publish_sess); 
     704        acc->publish_sess = NULL; 
     705    } 
    704706    return status; 
    705707} 
     
    736738 
    737739        /* Add credential for authentication */ 
    738         pjsip_publishc_set_credentials(acc->publish_sess, acc->cred_cnt,  
    739                                        acc->cred); 
     740        if (acc->cred_cnt) { 
     741            pjsip_publishc_set_credentials(acc->publish_sess, acc->cred_cnt,  
     742                                           acc->cred); 
     743        } 
    740744 
    741745        /* Set route-set */ 
Note: See TracChangeset for help on using the changeset viewer.