Changeset 997 for pjproject


Ignore:
Timestamp:
Feb 24, 2007 1:16:40 PM (18 years ago)
Author:
bennylp
Message:

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

Location:
pjproject/branches/pjproject-0.5-stable
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/pjproject-0.5-stable/pjmedia/include/pjmedia/config.h

    r974 r997  
    7979 * buffer is about 10 or 20 ms long. 
    8080 * 
    81  * Default: 32 
     81 * Default: 16 
    8282 */ 
    8383#ifndef PJMEDIA_SOUND_BUFFER_COUNT 
  • pjproject/branches/pjproject-0.5-stable/pjsip/include/pjsua-lib/pjsua_internal.h

    r974 r997  
    303303 
    304304/** 
     305 * Send PUBLISH 
     306 */ 
     307pj_status_t pjsua_pres_init_publish_acc(int acc_id); 
     308 
     309/** 
    305310 * Terminate server subscription for the account  
    306311 */ 
  • pjproject/branches/pjproject-0.5-stable/pjsip/src/pjsua-lib/pjsua_acc.c

    r974 r997  
    469469                       (int)param->reason.slen, param->reason.ptr, 
    470470                       param->expiration)); 
     471 
     472            /* Send initial PUBLISH if it is enabled */ 
     473            if (acc->cfg.publish_enabled && acc->publish_sess==NULL) 
     474                pjsua_pres_init_publish_acc(acc->index); 
    471475        } 
    472476 
  • pjproject/branches/pjproject-0.5-stable/pjsip/src/pjsua-lib/pjsua_pres.c

    r974 r997  
    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.