Commit f355aa2c authored by Kai Vehmanen's avatar Kai Vehmanen

Removed deprecated STUN function definitions from stun.c.

darcs-hash:20060506120457-7659e-2121b883e3002ec19dee81172ba738eb5db797a9.gz
parent acbccd52
......@@ -3065,91 +3065,3 @@ su_socket_t stun_discovery_get_socket(stun_discovery_t *sd)
* DEPRECATED functions
* -------------------------------------------------------------------
*/
/**
* Deprecated. Unregisters socket from STUN handle event loop
*/
int stun_handle_release(stun_handle_t *sh, su_socket_t s)
{
stun_discovery_t *sd;
int removed = 0;
assert (sh);
enter;
if (s < 0)
return errno = EFAULT, -1;
/* There can be several discoveries using the same socket. It is
still enough to deregister the socket in first of them */
/* count how many discoveries are using 's' */
for (sd = sh->sh_discoveries; sd; sd = sd->sd_next) {
if (sd->sd_socket != s)
continue;
if (!removed) {
su_root_deregister(sh->sh_root, sd->sd_index);
SU_DEBUG_3(("%s: socket deregistered from STUN \n", __func__));
++removed;
}
sd->sd_index = -1; /* mark index as deregistered */
}
if (!removed) {
/* Oops, user passed wrong socket */
SU_DEBUG_3(("%s: socket given is not associated with STUN \n", __func__));
return -1;
}
return 0;
}
/* Deprecated. Use stun_root(). */
su_root_t *stun_handle_root(stun_handle_t *self)
{
return stun_root(self);
}
/* Deprecated. Use stun_request_shared_secret() */
int stun_handle_request_shared_secret(stun_handle_t *sh)
{
return stun_obtain_shared_secret(sh, NULL, NULL, TAG_NULL());
}
/* Deprecated. Use stun_bind() */
int stun_handle_bind(stun_handle_t *sh,
tag_type_t tag, tag_value_t value,
...)
{
int err;
ta_list ta;
ta_start(ta, tag, value);
err = stun_bind(sh, NULL, NULL, ta_tags(ta));
ta_end(ta);
return err;
}
/* Deprecated. Use stun_set_uname_pwd(). */
int stun_handle_set_uname_pwd(stun_handle_t *sh,
const char *uname,
int len_uname,
const char *pwd,
int len_pwd)
{
return stun_set_uname_pwd(sh, uname, len_uname,
pwd, len_pwd);
}
/* Deprecated. Use stun_process_message() */
int stun_handle_process_message(stun_handle_t *sh, su_socket_t s,
su_sockaddr_t *sa, socklen_t salen,
void *data, int len)
{
return stun_process_message(sh, s, sa, salen,
data, len);
}
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