Changeset 2419
- Timestamp:
- Jan 12, 2009 10:06:04 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjnath/src/pjnath/ice_session.c
r2394 r2419 2458 2458 pj_ice_msg_data *msg_data = NULL; 2459 2459 unsigned i; 2460 pj_status_t stun_status;2461 2460 2462 2461 PJ_ASSERT_RETURN(ice, PJ_EINVAL); … … 2466 2465 comp = find_comp(ice, comp_id); 2467 2466 if (comp == NULL) { 2468 status = PJNATH_EICEINCOMPID;2469 goto on_return;2467 pj_mutex_unlock(ice->mutex); 2468 return PJNATH_EICEINCOMPID; 2470 2469 } 2471 2470 … … 2479 2478 if (msg_data == NULL) { 2480 2479 pj_assert(!"Invalid transport ID"); 2481 status = PJ_EINVAL;2482 goto on_return;2483 } 2484 2485 st un_status = pj_stun_msg_check((const pj_uint8_t*)pkt, pkt_size,2486 2487 if (st un_status == PJ_SUCCESS) {2480 pj_mutex_unlock(ice->mutex); 2481 return PJ_EINVAL; 2482 } 2483 2484 status = pj_stun_msg_check((const pj_uint8_t*)pkt, pkt_size, 2485 PJ_STUN_IS_DATAGRAM); 2486 if (status == PJ_SUCCESS) { 2488 2487 status = pj_stun_session_on_rx_pkt(comp->stun_sess, pkt, pkt_size, 2489 2488 PJ_STUN_IS_DATAGRAM, msg_data, … … 2494 2493 ice->tmp.errmsg)); 2495 2494 } 2495 pj_mutex_unlock(ice->mutex); 2496 2496 } else { 2497 /* Not a STUN packet. Call application's callback instead, but release 2498 * the mutex now or otherwise we may get deadlock. 2499 */ 2500 pj_mutex_unlock(ice->mutex); 2501 2497 2502 (*ice->cb.on_rx_data)(ice, comp_id, transport_id, pkt, pkt_size, 2498 2503 src_addr, src_addr_len); 2499 } 2500 2501 2502 on_return: 2503 pj_mutex_unlock(ice->mutex); 2504 status = PJ_SUCCESS; 2505 } 2506 2504 2507 return status; 2505 2508 }
Note: See TracChangeset
for help on using the changeset viewer.