Ignore:
Timestamp:
Aug 11, 2009 4:26:20 PM (15 years ago)
Author:
nanang
Message:

Ticket #833:

  • Renamed pjsip_timer_default_setting() to pjsip_timer_setting_default().
  • Updated session timer settings in pjsua-lib as whole session timer setting struct (pyhton version remains using se & min_se).
  • Added output param SIP status code in pjsip_timer_process_resp() and pjsip_timer_process_req() to specify the corresponding SIP status code when function returning non-PJ_SUCCESS.
  • Fixed print header functions in sip_timer.c to have buffer check.
  • Added PJSIP_SESS_TIMER_DEF_SE setting to specify the default value of session timer interval.
  • Fixed role reference of the refresher, it is transaction role, not dialog role.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsip-ua/sip_inv.c

    r2858 r2859  
    485485    pjsip_msg *msg = rdata->msg_info.msg; 
    486486    pj_status_t status; 
     487    pjsip_status_code st_code; 
    487488 
    488489    dlg = pjsip_rdata_get_dlg(rdata); 
     
    513514 
    514515    /* Pass response to timer session module */ 
    515     status = pjsip_timer_process_resp(inv, rdata); 
     516    status = pjsip_timer_process_resp(inv, rdata, &st_code); 
    516517    if (status != PJ_SUCCESS) { 
    517518        pjsip_event e; 
     
    521522        inv_send_ack(inv, &e); 
    522523 
    523         status = pjsip_inv_end_session(inv, PJSIP_ERRNO_TO_SIP_STATUS(status), 
    524                                        NULL, &tdata); 
     524        status = pjsip_inv_end_session(inv, st_code, NULL, &tdata); 
    525525        if (tdata && status == PJ_SUCCESS) 
    526526            pjsip_inv_send_msg(inv, tdata); 
     
    975975    if ( ((*options & PJSIP_INV_REQUIRE_100REL)!=0 &&  
    976976          (rem_option & PJSIP_INV_SUPPORT_100REL)==0) || 
    977          ((*options & PJSIP_INV_REQUIRE_100REL)!=0 &&  
    978           (rem_option & PJSIP_INV_SUPPORT_100REL)==0)) 
     977         ((*options & PJSIP_INV_REQUIRE_TIMER)!=0 &&  
     978          (rem_option & PJSIP_INV_SUPPORT_TIMER)==0)) 
    979979    { 
    980980        code = PJSIP_SC_EXTENSION_REQUIRED; 
     
    17561756    pjsip_tx_data *tdata; 
    17571757    pj_status_t status; 
     1758    pjsip_status_code st_code2; 
    17581759 
    17591760    /* Verify arguments. */ 
     
    17721773 
    17731774    /* Invoke Session Timers module */ 
    1774     status = pjsip_timer_process_req(inv, rdata); 
     1775    status = pjsip_timer_process_req(inv, rdata, &st_code2); 
    17751776    if (status != PJ_SUCCESS) { 
    17761777        pj_status_t status2; 
    17771778 
    1778         status2 = pjsip_dlg_modify_response(inv->dlg, tdata,  
    1779                                             PJSIP_ERRNO_TO_SIP_STATUS(status), 
    1780                                             NULL); 
     1779        status2 = pjsip_dlg_modify_response(inv->dlg, tdata, st_code2, NULL); 
    17811780        if (status2 != PJ_SUCCESS) { 
    17821781            pjsip_tx_data_dec_ref(tdata); 
     
    26392638    pj_status_t status; 
    26402639    pjsip_tx_data *tdata = NULL; 
     2640    pjsip_status_code st_code; 
    26412641 
    26422642    /* Invoke Session Timers module */ 
    2643     status = pjsip_timer_process_req(inv, rdata); 
     2643    status = pjsip_timer_process_req(inv, rdata, &st_code); 
    26442644    if (status != PJ_SUCCESS) { 
    2645         status = pjsip_dlg_create_response(inv->dlg, rdata,  
    2646                                            PJSIP_ERRNO_TO_SIP_STATUS(status), 
     2645        status = pjsip_dlg_create_response(inv->dlg, rdata, st_code, 
    26472646                                           NULL, &tdata); 
    26482647        goto on_return; 
     
    36603659            pjsip_tx_data *tdata; 
    36613660            pj_status_t status; 
     3661            pjsip_status_code st_code; 
    36623662 
    36633663            /* Check if we have INVITE pending. */ 
     
    36833683 
    36843684            /* Process session timers headers in the re-INVITE */ 
    3685             status = pjsip_timer_process_req(inv, rdata); 
     3685            status = pjsip_timer_process_req(inv, rdata, &st_code); 
    36863686            if (status != PJ_SUCCESS) { 
    3687                 status = pjsip_dlg_create_response(inv->dlg, rdata,  
    3688                                            PJSIP_ERRNO_TO_SIP_STATUS(status),  
    3689                                            NULL, &tdata); 
     3687                status = pjsip_dlg_create_response(inv->dlg, rdata, st_code, 
     3688                                                   NULL, &tdata); 
    36903689                if (status != PJ_SUCCESS) 
    36913690                    return; 
Note: See TracChangeset for help on using the changeset viewer.