Changeset 879 for pjproject/trunk/pjsip/src/pjsip/sip_transaction.c
- Timestamp:
- Jan 12, 2007 6:37:35 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsip/sip_transaction.c
r839 r879 932 932 tsx->transport = NULL; 933 933 } 934 /* Decrement reference counter in transport selector */ 935 pjsip_tpselector_dec_ref(&tsx->tp_sel); 936 934 937 /* Free last transmitted message. */ 935 938 if (tsx->last_tx) { … … 1364 1367 1365 1368 /* 1369 * Bind transaction to a specific transport/listener. 1370 */ 1371 PJ_DEF(pj_status_t) pjsip_tsx_set_transport(pjsip_transaction *tsx, 1372 const pjsip_tpselector *sel) 1373 { 1374 struct tsx_lock_data lck; 1375 1376 /* Must be UAC transaction */ 1377 PJ_ASSERT_RETURN(tsx && sel && tsx->role == PJSIP_ROLE_UAC, PJ_EINVAL); 1378 1379 /* Start locking the transaction. */ 1380 lock_tsx(tsx, &lck); 1381 1382 /* Decrement reference counter of previous transport selector */ 1383 pjsip_tpselector_dec_ref(&tsx->tp_sel); 1384 1385 /* Copy transport selector structure .*/ 1386 pj_memcpy(&tsx->tp_sel, sel, sizeof(*sel)); 1387 1388 /* Increment reference counter */ 1389 pjsip_tpselector_add_ref(&tsx->tp_sel); 1390 1391 /* Unlock transaction. */ 1392 unlock_tsx(tsx, &lck); 1393 1394 return PJ_SUCCESS; 1395 } 1396 1397 1398 /* 1366 1399 * Set transaction status code and reason. 1367 1400 */ … … 1424 1457 /* Dispatch to transaction. */ 1425 1458 lock_tsx(tsx, &lck); 1459 1460 /* Set transport selector to tdata */ 1461 pjsip_tx_data_set_transport(tdata, &tsx->tp_sel); 1462 1463 /* Dispatch to state handler */ 1426 1464 status = (*tsx->state_handler)(tsx, &event); 1465 1427 1466 unlock_tsx(tsx, &lck); 1428 1467 1429 /* Will always decrement tdata reference counter1430 * ( consistent with other send functions.1468 /* Only decrement reference counter when it returns success. 1469 * (This is the specification from the .PDF design document). 1431 1470 */ 1432 1471 if (status == PJ_SUCCESS) {
Note: See TracChangeset
for help on using the changeset viewer.