Changeset 5937


Ignore:
Timestamp:
Feb 28, 2019 9:09:42 AM (5 years ago)
Author:
nanang
Message:

Re #2147: Added logging and explicit SIP error code for assertions in SIP message verification.

Location:
pjproject/trunk/pjsip/src
Files:
2 edited

Legend:

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

    r5931 r5937  
    11821182 
    11831183            /* Local SDP must be valid! */ 
    1184             PJ_ASSERT_RETURN((status=pjmedia_sdp_validate(l_sdp))==PJ_SUCCESS, 
    1185                              status); 
     1184            status = pjmedia_sdp_validate(l_sdp); 
     1185            if (status != PJ_SUCCESS) { 
     1186                pj_assert(!"Invalid local SDP"); 
     1187                code = PJSIP_SC_INTERNAL_SERVER_ERROR; 
     1188                goto on_return; 
     1189            } 
    11861190 
    11871191            /* Create SDP negotiator */ 
    11881192            status = pjmedia_sdp_neg_create_w_remote_offer( 
    11891193                            tmp_pool, l_sdp, r_sdp, &neg); 
    1190             PJ_ASSERT_RETURN(status == PJ_SUCCESS, status); 
     1194            if (status != PJ_SUCCESS) { 
     1195                pj_assert(!"Failed creating SDP negotiator"); 
     1196                code = PJSIP_SC_INTERNAL_SERVER_ERROR; 
     1197                goto on_return; 
     1198            } 
    11911199 
    11921200            /* Negotiate SDP */ 
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c

    r5930 r5937  
    12411241             * No we can't handle the incoming INVITE request. 
    12421242             */ 
     1243            pjsua_perror(THIS_FILE, "Request verification failed", status); 
     1244 
    12431245            if (response) 
    12441246                err_code = (*response)->msg->line.status.code; 
Note: See TracChangeset for help on using the changeset viewer.