Changeset 5323
- Timestamp:
- May 27, 2016 2:55:12 AM (8 years ago)
- Location:
- pjproject/trunk/pjsip
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/include/pjsua-lib/pjsua_internal.h
r5307 r5323 173 173 pj_bool_t hangup; /**< Call is hangup? */ 174 174 } out_call; 175 struct { 175 struct { 176 176 call_answer answers;/**< A list of call answers. */ 177 pj_bool_t hangup;/**< Call is hangup? */ 177 178 pjsip_dialog *replaced_dlg; /**< Replaced dialog. */ 178 179 } inc_call; -
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c
r5317 r5323 1638 1638 /* onIncomingCall() may be simulated by onCreateMediaTransport() 1639 1639 * when media init is done synchrounously (see #1916). And if app 1640 * happens to answer the call from the callback, the answer should 1641 * have been delayed (see #1923), so let's process the answer now. 1640 * happens to answer/hangup the call from the callback, the 1641 * answer/hangup should have been delayed (see #1923), 1642 * so let's process the answer/hangup now. 1642 1643 */ 1643 if (call->med_ch_cb == NULL) 1644 if (call->async_call.call_var.inc_call.hangup) { 1645 pjsua_call_hangup(call_id, call->last_code, &call->last_text, 1646 NULL); 1647 } else if (call->med_ch_cb == NULL) { 1644 1648 process_pending_call_answer(call); 1649 } 1645 1650 } else { 1646 1651 pjsua_call_hangup(call_id, PJSIP_SC_TEMPORARILY_UNAVAILABLE, … … 2337 2342 * the call in the media transport creation callback instead. 2338 2343 */ 2339 if (call->med_ch_cb && !call->inv) { 2344 if ((call->med_ch_cb && !call->inv) || 2345 ((call->inv != NULL) && (call->inv->state == PJSIP_INV_STATE_NULL))) 2346 { 2340 2347 PJ_LOG(4,(THIS_FILE, "Pending call %d hangup upon completion " 2341 2348 "of media transport", call_id)); 2342 call->async_call.call_var.out_call.hangup = PJ_TRUE; 2349 2350 if (call->inv->role == PJSIP_ROLE_UAS) 2351 call->async_call.call_var.inc_call.hangup = PJ_TRUE; 2352 else 2353 call->async_call.call_var.out_call.hangup = PJ_TRUE; 2354 2343 2355 if (code == 0) 2344 2356 call->last_code = PJSIP_SC_REQUEST_TERMINATED;
Note: See TracChangeset
for help on using the changeset viewer.