Changeset 1790
- Timestamp:
- Feb 13, 2008 4:59:29 PM (17 years ago)
- Location:
- pjproject/trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/src/pjmedia/stream.c
r1780 r1790 1400 1400 1401 1401 1402 /* Detach from transport 1403 * MUST NOT hold stream mutex while detaching from transport, as 1404 * it may cause deadlock. See ticket #460 for the details. 1405 */ 1406 if (stream->transport) { 1407 pjmedia_transport_detach(stream->transport, stream); 1408 stream->transport = NULL; 1409 } 1410 1402 1411 /* This function may be called when stream is partly initialized. */ 1403 1412 if (stream->jb_mutex) 1404 1413 pj_mutex_lock(stream->jb_mutex); 1405 1414 1406 1407 /* Detach from transport */1408 if (stream->transport) {1409 (*stream->transport->op->detach)(stream->transport, stream);1410 stream->transport = NULL;1411 }1412 1415 1413 1416 /* Free codec. */ -
pjproject/trunk/pjmedia/src/pjmedia/transport_ice.c
r1763 r1790 699 699 struct transport_ice *tp_ice = (struct transport_ice*)tp; 700 700 701 /* TODO: need to solve ticket #460 here */ 702 701 703 tp_ice->rtp_cb = NULL; 702 704 tp_ice->rtcp_cb = NULL; -
pjproject/trunk/pjmedia/src/pjmedia/transport_udp.c
r1763 r1790 320 320 goto on_error; 321 321 322 /* Disallow concurrency so that detach() and destroy() are 323 * synchronized with the callback. 324 */ 325 status = pj_ioqueue_set_concurrency(tp->rtp_key, PJ_FALSE); 326 if (status != PJ_SUCCESS) 327 goto on_error; 328 322 329 pj_ioqueue_op_key_init(&tp->rtp_read_op, sizeof(tp->rtp_read_op)); 323 330 for (i=0; i<PJ_ARRAY_SIZE(tp->rtp_pending_write); ++i) … … 344 351 goto on_error; 345 352 353 status = pj_ioqueue_set_concurrency(tp->rtcp_key, PJ_FALSE); 354 if (status != PJ_SUCCESS) 355 goto on_error; 356 346 357 pj_ioqueue_op_key_init(&tp->rtcp_read_op, sizeof(tp->rtcp_read_op)); 347 358 pj_ioqueue_op_key_init(&tp->rtcp_write_op, sizeof(tp->rtcp_write_op)); … … 384 395 385 396 if (udp->rtp_key) { 397 /* This will block the execution if callback is still 398 * being called. 399 */ 386 400 pj_ioqueue_unregister(udp->rtp_key); 387 401 udp->rtp_key = NULL; … … 646 660 647 661 if (udp->attached) { 662 /* Lock the ioqueue keys to make sure that callbacks are 663 * not executed. See ticket #460 for details. 664 */ 665 pj_ioqueue_lock_key(udp->rtp_key); 666 pj_ioqueue_lock_key(udp->rtcp_key); 667 648 668 /* User data is unreferenced on Release build */ 649 669 PJ_UNUSED_ARG(user_data); … … 659 679 udp->rtcp_cb = NULL; 660 680 udp->user_data = NULL; 681 682 /* Unlock keys */ 683 pj_ioqueue_unlock_key(udp->rtcp_key); 684 pj_ioqueue_unlock_key(udp->rtp_key); 661 685 } 662 686 } -
pjproject/trunk/pjnath/src/pjnath/ice_strans.c
r1731 r1790 329 329 comp->sock, comp, &ioqueue_cb, 330 330 &comp->key); 331 if (status != PJ_SUCCESS) 332 goto on_error; 333 334 /* Disable concurrency */ 335 status = pj_ioqueue_set_concurrency(comp->key, PJ_FALSE); 331 336 if (status != PJ_SUCCESS) 332 337 goto on_error;
Note: See TracChangeset
for help on using the changeset viewer.