Changeset 5899 for pjproject/trunk/pjsip/src/pjsua2/endpoint.cpp
- Timestamp:
- Oct 17, 2018 4:38:39 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsua2/endpoint.cpp
r5891 r5899 1192 1192 prm.statusCode = *code; 1193 1193 prm.opt.fromPj(*opt); 1194 prm.newCall = NULL; 1194 1195 1195 1196 call->onCallTransferRequest(prm); … … 1197 1198 *code = prm.statusCode; 1198 1199 *opt = prm.opt.toPj(); 1200 if (*code/100 <= 2) { 1201 if (prm.newCall) { 1202 /* We don't manage (e.g: create, delete) the call child, 1203 * so let's just override any existing child. 1204 */ 1205 call->child = prm.newCall; 1206 call->child->id = PJSUA_INVALID_ID; 1207 } else { 1208 PJ_LOG(4,(THIS_FILE, 1209 "Warning: application reuses Call instance in " 1210 "call transfer (call ID:%d)", call_id)); 1211 } 1212 } 1199 1213 } 1200 1214 … … 1255 1269 OnCallReplacedParam prm; 1256 1270 prm.newCallId = new_call_id; 1271 prm.newCall = NULL; 1257 1272 1258 1273 call->onCallReplaced(prm); 1274 1275 if (prm.newCall) { 1276 /* Sanity checks */ 1277 pj_assert(prm.newCall->id == new_call_id); 1278 pj_assert(prm.newCall->acc.getId() == call->acc.getId()); 1279 pj_assert(pjsua_call_get_user_data(new_call_id) == prm.newCall); 1280 } else { 1281 PJ_LOG(4,(THIS_FILE, 1282 "Warning: application has not created new Call instance " 1283 "for call replace (old call ID:%d, new call ID: %d)", 1284 old_call_id, new_call_id)); 1285 } 1259 1286 } 1260 1287
Note: See TracChangeset
for help on using the changeset viewer.