Changeset 2065 for pjproject


Ignore:
Timestamp:
Jun 26, 2008 7:47:23 PM (16 years ago)
Author:
bennylp
Message:

Fixed assertion in invite session when INVITE has bad SDP because the SDP is given without having been validated first

File:
1 edited

Legend:

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

    r2064 r2065  
    722722                                   (char*)rdata->msg_info.msg->body->data, 
    723723                                   rdata->msg_info.msg->body->len, &offer); 
     724        if (status == PJ_SUCCESS) { 
     725            /* Validate */ 
     726            status = pjmedia_sdp_validate(offer); 
     727        } 
     728 
    724729        if (status != PJ_SUCCESS) { 
    725730            const pj_str_t reason = pj_str("Bad SDP"); 
    726             pjsua_perror(THIS_FILE, "Error parsing SDP in incoming INVITE",  
     731            pjsip_hdr hdr_list; 
     732            pjsip_warning_hdr *w; 
     733 
     734            pjsua_perror(THIS_FILE, "Bad SDP in incoming INVITE",  
    727735                         status); 
     736 
     737            w = pjsip_warning_hdr_create_from_status(rdata->tp_info.pool,  
     738                                             pjsip_endpt_name(pjsua_var.endpt), 
     739                                             status); 
     740            pj_list_init(&hdr_list); 
     741            pj_list_push_back(&hdr_list, w); 
     742 
    728743            pjsip_endpt_respond(pjsua_var.endpt, NULL, rdata, 400,  
    729                                 &reason, NULL, NULL, NULL); 
     744                                &reason, &hdr_list, NULL, NULL); 
    730745            PJSUA_UNLOCK(); 
    731746            return PJ_TRUE; 
Note: See TracChangeset for help on using the changeset viewer.