Commit d8cb9e42 authored by Kai Vehmanen's avatar Kai Vehmanen

Fixed STUN functionality. Incorrect sockaddr len was passed to su_sendto().

darcs-hash:20061010122027-7659e-4081005c6757e4948dcec7b61223da791de19b2f.gz
parent bc0b85e4
......@@ -614,11 +614,9 @@ int stun_send_message(su_socket_t s, su_sockaddr_t *to_addr,
char ipaddr[SU_ADDRSIZE + 2];
stun_attr_t **a, *b;
socklen_t tolen = SU_ADDRLEN(to_addr);
stun_encode_message(msg, pwd);
err = su_sendto(s, msg->enc_buf.data, msg->enc_buf.size, 0, to_addr, tolen);
err = su_sendto(s, msg->enc_buf.data, msg->enc_buf.size, 0, to_addr, sizeof *to_addr);
free(msg->enc_buf.data), msg->enc_buf.data = NULL;
msg->enc_buf.size = 0;
......
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