Changeset 2273


Ignore:
Timestamp:
Sep 11, 2008 10:25:51 AM (11 years ago)
Author:
bennylp
Message:

Ticket #623: Assertion when receiving SUBSCRIBE with non presence event (thanks Lucas Rosa Galêgo for the report)

Location:
pjproject/trunk
Files:
1 added
1 edited

Legend:

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

    r2264 r2273  
    719719    status = pjsip_pres_create_uas( dlg, &pres_cb, rdata, &sub); 
    720720    if (status != PJ_SUCCESS) { 
    721         pjsip_dlg_terminate(dlg); 
     721        int code = PJSIP_ERRNO_TO_SIP_STATUS(status); 
     722        pjsip_tx_data *tdata; 
     723 
    722724        pjsua_perror(THIS_FILE, "Unable to create server subscription",  
    723725                     status); 
     726 
     727        if (code==599 || code > 699 || code < 300) { 
     728            code = 400; 
     729        } 
     730 
     731        status = pjsip_dlg_create_response(dlg, rdata, code, NULL, &tdata); 
     732        if (status == PJ_SUCCESS) { 
     733            status = pjsip_dlg_send_response(dlg, pjsip_rdata_get_tsx(rdata), 
     734                                             tdata); 
     735        } 
     736 
    724737        PJSUA_UNLOCK(); 
    725738        return PJ_TRUE; 
Note: See TracChangeset for help on using the changeset viewer.