- Timestamp:
- Jul 5, 2013 8:00:06 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjnath/src/pjnath/turn_session.c
r4537 r4551 121 121 pj_status_t last_status; 122 122 pj_bool_t pending_destroy; 123 pj_bool_t destroy_notified;124 123 125 124 pj_stun_session *stun; … … 132 131 pj_timer_entry timer; 133 132 134 pj_dns_srv_async_query *dns_async;135 133 pj_uint16_t default_port; 136 134 … … 396 394 break; 397 395 case PJ_TURN_STATE_RESOLVING: 398 if (sess->dns_async != NULL) { 399 pj_dns_srv_cancel_query(sess->dns_async, PJ_FALSE); 400 sess->dns_async = NULL; 401 } 396 /* Wait for DNS callback invoked, it will call the this function 397 * again. If the callback happens to get pending_destroy==FALSE, 398 * the TURN allocation will call this function again. 399 */ 400 sess->pending_destroy = PJ_TRUE; 401 can_destroy = PJ_FALSE; 402 402 break; 403 403 case PJ_TURN_STATE_RESOLVED: … … 620 620 status = pj_dns_srv_resolve(domain, &res_name, default_port, 621 621 sess->pool, resolver, opt, sess, 622 &dns_srv_resolver_cb, &sess->dns_async);622 &dns_srv_resolver_cb, NULL); 623 623 if (status != PJ_SUCCESS) { 624 624 set_state(sess, PJ_TURN_STATE_NULL); … … 1683 1683 unsigned i, cnt, tot_cnt; 1684 1684 1685 /* Clear async resolver */1686 sess->dns_async = NULL;1687 1688 1685 /* Check failure */ 1689 if (status != PJ_SUCCESS) { 1686 if (status != PJ_SUCCESS || sess->pending_destroy) { 1687 set_state(sess, PJ_TURN_STATE_DESTROYING); 1690 1688 sess_shutdown(sess, status); 1691 1689 return;
Note: See TracChangeset
for help on using the changeset viewer.