Commit ba36e51d authored by Martti Mela's avatar Martti Mela

stun works (again) with TPORT, nua_cli

darcs-hash:20060114184811-1b897-91cd51d4ae3b8ebf1f647b3f50acd135ca1aa4ed.gz
parent 09c1e857
......@@ -655,6 +655,7 @@ static int get_localinfo(su_localinfo_t *clientinfo)
int i, error, found = 0;
char ipaddr[SU_ADDRSIZE + 2] = { 0 };
hints->li_family = AF_INET;
if ((error = su_getlocalinfo(hints, &res)) == 0) {
......@@ -779,9 +780,11 @@ int stun_handle_bind(stun_handle_t *sh,
}
else {
/* Not bound - bind it */
//get_localinfo(clientinfo);
#if defined (__CYGWIN__)
get_localinfo(clientinfo);
#endif
clientinfo->li_family = AF_INET6;
/* clientinfo->li_family = AF_INET6; */
if ((err = bind(s, (struct sockaddr *) sa, bind_len)) < 0) {
STUN_ERROR(errno, bind);
SU_DEBUG_3(("%s: Error binding to %s:%u\n", __func__,
......
......@@ -163,7 +163,7 @@ int main(int argc, char *argv[])
return -1;
}
s = su_socket(AF_INET6, SOCK_DGRAM, 0);
s = su_socket(AF_INET, SOCK_DGRAM, 0);
if (s == -1) {
SU_DEBUG_0(("%s: %s failed: %s\n", __func__, "stun_socket_create()", su_gli_strerror(errno)));
return -1;
......
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