Changeset 5978 for pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c
- Timestamp:
- May 6, 2019 10:55:35 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c
r5977 r5978 1232 1232 1233 1233 if (status != PJ_SUCCESS) { 1234 err_code = PJSIP_SC_ NOT_ACCEPTABLE_HERE;1234 err_code = PJSIP_SC_INTERNAL_SERVER_ERROR; 1235 1235 pjsua_perror(THIS_FILE, "Error creating SDP answer", status); 1236 1236 } … … 1241 1241 1242 1242 if (status != PJ_SUCCESS) { 1243 err_code = *sip_err_code; 1243 1244 pjsua_perror(THIS_FILE, "Error creating SDP answer", status); 1244 1245 } else { 1245 1246 status = pjsip_inv_set_local_sdp(call->inv, answer); 1246 1247 if (status != PJ_SUCCESS) { 1248 err_code = PJSIP_SC_NOT_ACCEPTABLE_HERE; 1247 1249 pjsua_perror(THIS_FILE, "Error setting local SDP", status); 1248 err_code = PJSIP_SC_NOT_ACCEPTABLE_HERE;1249 1250 } 1250 1251 } … … 1268 1269 err_code = (*response)->msg->line.status.code; 1269 1270 else 1270 err_code = PJSIP_ERRNO_TO_SIP_STATUS(status); 1271 } 1272 } 1273 if (sip_err_code) 1274 *sip_err_code = err_code; 1271 err_code = PJSIP_SC_NOT_ACCEPTABLE_HERE; 1272 } 1273 } 1274 1275 if (sip_err_code && status != PJ_SUCCESS) 1276 *sip_err_code = err_code? err_code:PJSIP_ERRNO_TO_SIP_STATUS(status); 1275 1277 1276 1278 return status; … … 1293 1295 PJSUA_LOCK(); 1294 1296 1295 if (sip_err_code)1296 *sip_err_code = err_code;1297 1298 1297 /* Increment the dialog's lock to prevent it to be destroyed prematurely, 1299 1298 * such as in case of transport error. … … 1322 1321 on_return: 1323 1322 if (status != PJ_SUCCESS) { 1323 if (err_code == 0) 1324 err_code = PJSIP_ERRNO_TO_SIP_STATUS(status); 1325 1326 if (sip_err_code) 1327 *sip_err_code = err_code; 1328 1324 1329 /* If the callback is called from pjsua_call_on_incoming(), the 1325 1330 * invite's state is PJSIP_INV_STATE_NULL, so the invite session … … 1359 1364 1360 1365 pjsip_dlg_dec_lock(dlg); 1361 1362 if (sip_err_code)1363 *sip_err_code = err_code;1364 1366 1365 1367 if (tdata) … … 1805 1807 if (response) { 1806 1808 pjsip_dlg_send_response(dlg, call->inv->invite_tsx, response); 1807 1808 1809 } else { 1809 1810 pjsip_dlg_respond(dlg, rdata, sip_err_code, NULL, NULL, NULL); … … 2490 2491 pjsip_tx_data *tdata; 2491 2492 pj_status_t status_; 2493 2494 if (sip_err_code == 0) 2495 sip_err_code = PJSIP_ERRNO_TO_SIP_STATUS(status); 2492 2496 2493 2497 status_ = pjsip_inv_end_session(call->inv, sip_err_code, NULL,
Note: See TracChangeset
for help on using the changeset viewer.