Commit 670f9c2c authored by Martti Mela's avatar Martti Mela

stun: actions are now very separate from each other

darcs-hash:20060113034805-1b897-94c791ff36ef20ec1debc83a9557880cd557c2ac.gz
parent 406f5067
This diff is collapsed.
......@@ -108,6 +108,7 @@ typedef enum stun_state_e {
stun_bind_error,
stun_bind_timeout,
stun_request_timeout,
stun_discovery_timeout,
} stun_state_t;
......@@ -141,6 +142,10 @@ stun_handle_t *stun_handle_create(stun_magic_t *context,
stun_event_f cb,
tag_type_t tag, tag_value_t value, ...);
/** Unregister socket from STUN handle event loop */
int stun_handle_release(stun_handle_t *sh, su_socket_t s);
void stun_handle_destroy(stun_handle_t *sh);
su_root_t *stun_handle_root(stun_handle_t *sh);
......
......@@ -91,7 +91,7 @@ int stun_process_response(stun_msg_t *msg);
int stun_process_binding_response(stun_msg_t *msg);
int stun_process_error_response(stun_msg_t *msg);
int stun_atoaddr(int ai_family, su_addrinfo_t *info, su_sockaddr_t *addr, char const *in);
int stun_atoaddr(int ai_family, su_addrinfo_t *info, /* su_sockaddr_t *addr, */ char const *in);
int stun_add_response_address(stun_msg_t *req, struct sockaddr_in *mapped_addr);
SOFIA_END_DECLS
......
......@@ -109,12 +109,12 @@ void stunc_callback(stunc_t *stunc, stun_handle_t *sh,
ipaddr, (unsigned) ntohs(li->li_addr->su_port)));
/* su_root_break(stun_handle_root(sh)); */
if (stun_handle_get_nattype(sh, /* STUNTAG_SOCKET(s), */ TAG_NULL()) < 0) {
if (stun_handle_get_nattype(sh, STUNTAG_SOCKET(s), TAG_NULL()) < 0) {
SU_DEBUG_0(("%s: %s failed\n", __func__, "stun_handle_get_nattype()"));
su_root_break(stun_handle_root(sh));
}
if (stun_handle_get_lifetime(sh, /* STUNTAG_SOCKET(s), */ TAG_NULL()) < 0) {
if (stun_handle_get_lifetime(sh, STUNTAG_SOCKET(s), TAG_NULL()) < 0) {
SU_DEBUG_0(("%s: %s failed\n", __func__, "stun_handle_get_lifetime()"));
su_root_break(stun_handle_root(sh));
}
......@@ -123,7 +123,7 @@ void stunc_callback(stunc_t *stunc, stun_handle_t *sh,
case stun_bind_error:
case stun_error:
su_root_break(stun_handle_root(sh));
/* su_root_break(stun_handle_root(sh)); */
case stun_bind_timeout:
default:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment