Ignore:
Timestamp:
Aug 1, 2010 9:48:51 AM (14 years ago)
Author:
bennylp
Message:

Implemented core multipart support and support in the invite session (re #1070)

  • incoming multipart message will be handled automatically
  • for testing, enable HAVE_MULTIPART_TEST in pjsua_app.c
File:
1 edited

Legend:

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

    r3239 r3243  
    646646    int call_id = -1; 
    647647    int sip_err_code; 
    648     pjmedia_sdp_session *offer, *answer; 
     648    pjmedia_sdp_session *offer=NULL, *answer; 
    649649    pj_status_t status; 
    650650 
     
    766766    /* Parse SDP from incoming request */ 
    767767    if (rdata->msg_info.msg->body) { 
    768         status = pjmedia_sdp_parse(rdata->tp_info.pool,  
    769                                    (char*)rdata->msg_info.msg->body->data, 
    770                                    rdata->msg_info.msg->body->len, &offer); 
    771         if (status == PJ_SUCCESS) { 
    772             /* Validate */ 
    773             status = pjmedia_sdp_validate(offer); 
    774         } 
     768        pjsip_rdata_sdp_info *sdp_info; 
     769 
     770        sdp_info = pjsip_rdata_get_sdp_info(rdata); 
     771        offer = sdp_info->sdp; 
     772 
     773        status = sdp_info->sdp_err; 
     774        if (status==PJ_SUCCESS && sdp_info->sdp==NULL) 
     775            status = PJSIP_ERRNO_FROM_SIP_STATUS(PJSIP_SC_NOT_ACCEPTABLE); 
    775776 
    776777        if (status != PJ_SUCCESS) { 
Note: See TracChangeset for help on using the changeset viewer.