Ignore:
Timestamp:
Feb 24, 2007 1:29:22 PM (17 years ago)
Author:
bennylp
Message:

Fixed ticket #90: PUBLISH is rejected with 404 when REGISTER is challenged with 401/407

File:
1 edited

Legend:

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

    r974 r998  
    672672 
    673673/* Create client publish session */ 
    674 static pj_status_t create_publish(int acc_id) 
     674pj_status_t pjsua_pres_init_publish_acc(int acc_id) 
    675675{ 
    676676    const pj_str_t STR_PRESENCE = { "presence", 8 }; 
     
    723723    pj_list_init(&acc->pres_srv_list); 
    724724 
    725  
    726     return create_publish(acc_id); 
     725    return PJ_SUCCESS; 
    727726} 
    728727 
     
    804803    } 
    805804 
    806     /* Send PUBLISH if required */ 
    807     if (acc_cfg->publish_enabled) { 
    808         if (acc->publish_sess == NULL) 
    809             create_publish(acc_id); 
    810  
    811         if (acc->publish_sess && acc->publish_state != acc->online_status) { 
     805    /* Send PUBLISH if required. We only do this when we have a PUBLISH 
     806     * session. If we don't have a PUBLISH session, then it could be 
     807     * that we're waiting until registration has completed before we 
     808     * send the first PUBLISH.  
     809     */ 
     810    if (acc_cfg->publish_enabled && acc->publish_sess) { 
     811        if (acc->publish_state != acc->online_status) { 
    812812            send_publish(acc_id, PJ_TRUE); 
    813813        } 
Note: See TracChangeset for help on using the changeset viewer.