Changeset 3878


Ignore:
Timestamp:
Oct 31, 2011 10:31:23 AM (8 years ago)
Author:
ming
Message:

Re #1395: Backport of PJSIP 1.x branch into PJSIP 2.0 trunk

Location:
pjproject/trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk

  • pjproject/trunk/pjmedia/src/pjmedia-codec/ipp_codecs.c

    r3841 r3878  
    439439 
    440440 
    441 #if PJMEDIA_HAS_INTEL_IPP_CODEC_AMR 
     441#if PJMEDIA_HAS_INTEL_IPP_CODEC_AMR || PJMEDIA_HAS_INTEL_IPP_CODEC_AMRWB 
    442442 
    443443#include <pjmedia-codec/amr_helper.h> 
  • pjproject/trunk/pjmedia/src/pjmedia/stream.c

    r3842 r3878  
    20732073        stream->codec_param.setting.frm_per_pkt = 1; 
    20742074 
     2075    /* Init the codec. */ 
     2076    status = pjmedia_codec_init(stream->codec, pool); 
     2077    if (status != PJ_SUCCESS) 
     2078        goto err_cleanup; 
     2079 
    20752080    /* Open the codec. */ 
    20762081    status = pjmedia_codec_open(stream->codec, &stream->codec_param); 
  • pjproject/trunk/pjmedia/src/pjmedia/wav_player.c

    r3664 r3878  
    462462    fport = (struct file_reader_port*) port; 
    463463 
    464     PJ_ASSERT_RETURN(bytes < fport->fsize - fport->start_data, PJ_EINVAL); 
     464    /* Check that this offset does not pass the audio-data (in case of 
     465     * extra chunk after audio data chunk 
     466     */ 
     467    PJ_ASSERT_RETURN(bytes < fport->data_len, PJ_EINVAL); 
    465468 
    466469    fport->fpos = fport->start_data + bytes; 
     470    fport->data_left = fport->data_len - bytes; 
    467471    pj_file_setpos( fport->fd, fport->fpos, PJ_SEEK_SET); 
    468472 
  • pjproject/trunk/pjsip/src/pjsip-ua/sip_inv.c

    r3841 r3878  
    456456    if (method->id == PJSIP_ACK_METHOD && inv) { 
    457457 
     458        /* Ignore if we don't have INVITE in progress */ 
     459        if (!inv->invite_tsx) { 
     460            return PJ_TRUE; 
     461        } 
     462 
    458463        /* Ignore ACK if pending INVITE transaction has not finished. */ 
    459         if (inv->invite_tsx &&  
    460             inv->invite_tsx->state < PJSIP_TSX_STATE_COMPLETED) 
    461         { 
     464        if (inv->invite_tsx->state < PJSIP_TSX_STATE_COMPLETED) { 
    462465            return PJ_TRUE; 
    463466        } 
    464467 
     468        /* Ignore ACK with different CSeq 
     469         * https://trac.pjsip.org/repos/ticket/1391 
     470         */ 
     471        if (rdata->msg_info.cseq->cseq != inv->invite_tsx->cseq) { 
     472            return PJ_TRUE; 
     473        } 
     474 
    465475        /* Terminate INVITE transaction, if it's still present. */ 
    466         if (inv->invite_tsx &&  
    467             inv->invite_tsx->state <= PJSIP_TSX_STATE_COMPLETED) 
    468         { 
     476        if (inv->invite_tsx->state <= PJSIP_TSX_STATE_COMPLETED) { 
    469477            /* Before we terminate INVITE transaction, process the SDP 
    470478             * in the ACK request, if any.  
  • pjproject/trunk/pjsip/src/pjsip/sip_auth_client.c

    r3553 r3878  
    279279    /* Check algorithm is supported. We support MD5 and AKAv1-MD5. */ 
    280280    if (chal->algorithm.slen==0 || 
    281         (pj_stricmp(&chal->algorithm, &pjsip_MD5_STR) || 
    282          pj_stricmp(&chal->algorithm, &pjsip_AKAv1_MD5_STR))) 
     281        (pj_stricmp(&chal->algorithm, &pjsip_MD5_STR)==0 || 
     282         pj_stricmp(&chal->algorithm, &pjsip_AKAv1_MD5_STR)==0)) 
    283283    { 
    284284        ; 
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_acc.c

    r3864 r3878  
    896896#endif 
    897897 
     898    /* Use of proxy */ 
     899    if (acc->cfg.reg_use_proxy != cfg->reg_use_proxy) { 
     900        acc->cfg.reg_use_proxy = cfg->reg_use_proxy; 
     901        update_reg = PJ_TRUE; 
     902    } 
     903 
    898904    /* Global outbound proxy */ 
    899905    if (global_route_crc != acc->global_route_crc) { 
     
    10061012    acc->cfg.reg_first_retry_interval = cfg->reg_first_retry_interval; 
    10071013    acc->cfg.drop_calls_on_reg_fail = cfg->drop_calls_on_reg_fail; 
     1014    acc->cfg.register_on_acc_add = cfg->register_on_acc_add; 
    10081015    if (acc->cfg.reg_delay_before_refresh != cfg->reg_delay_before_refresh) { 
    10091016        acc->cfg.reg_delay_before_refresh = cfg->reg_delay_before_refresh; 
     
    10681075    acc->cfg.vid_cap_dev = cfg->vid_cap_dev; 
    10691076    acc->cfg.vid_rend_dev = cfg->vid_rend_dev; 
     1077 
     1078    /* Call hold type */ 
     1079    acc->cfg.call_hold_type = cfg->call_hold_type; 
    10701080 
    10711081on_return: 
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_core.c

    r3841 r3878  
    13221322         */ 
    13231323        if (wait) { 
    1324             while (pjsua_var.stun_status == PJ_EPENDING) 
    1325                 pjsua_handle_events(10); 
     1324            while (pjsua_var.stun_status == PJ_EPENDING) { 
     1325                if (pjsua_var.thread[0] == NULL) 
     1326                    pjsua_handle_events(10); 
     1327                else 
     1328                    pj_thread_sleep(10); 
     1329            } 
    13261330        } 
    13271331    } 
Note: See TracChangeset for help on using the changeset viewer.