assert (stun_agent_validate (&agent, &msg, buf, len, NULL, NULL)
== STUN_VALIDATION_SUCCESS);
- val = stun_usage_bind_process (&msg, &addr, &addrlen, &addr, &addrlen);
+ val = stun_usage_bind_process (&msg, (struct sockaddr *) &addr, &addrlen,
+ (struct sockaddr *) &addr, &addrlen);
assert (val == STUN_USAGE_BIND_RETURN_INVALID);
/* Send response with wrong request type */
/* Send error response without ERROR-CODE */
buf[1] |= 0x10;
- val = stun_usage_bind_process (&msg, &addr, &addrlen, &addr, &addrlen);
+ val = stun_usage_bind_process (&msg, (struct sockaddr *) &addr, &addrlen,
+ (struct sockaddr *) &addr, &addrlen);
assert (val == STUN_USAGE_BIND_RETURN_INVALID);
close (fd);
val = getsockname (servfd, (struct sockaddr *)&addr, &addrlen);
assert (val == 0);
- val = stun_usage_bind_process (&msg, &addr, &addrlen, &addr, &addrlen);
+ val = stun_usage_bind_process (&msg, (struct sockaddr *) &addr, &addrlen,
+ (struct sockaddr *) &addr, &addrlen);
assert (val == STUN_USAGE_BIND_RETURN_ERROR);
/* Send response with a no mapped address at all */
val = getsockname (servfd, (struct sockaddr *)&addr, &addrlen);
assert (val == 0);
- val = stun_usage_bind_process (&msg, &addr, &addrlen, &addr, &addrlen);
+ val = stun_usage_bind_process (&msg, (struct sockaddr *) &addr, &addrlen,
+ (struct sockaddr *) &addr, &addrlen);
assert (val == STUN_USAGE_BIND_RETURN_ERROR);
/* Send old-style response */
stun_agent_init_response (&agent, &msg, buf, sizeof (buf), &msg);
assert (stun_message_append_addr (&msg, STUN_ATTRIBUTE_MAPPED_ADDRESS,
- &addr, addrlen) == STUN_MESSAGE_RETURN_SUCCESS);
+ (struct sockaddr *) &addr, addrlen) == STUN_MESSAGE_RETURN_SUCCESS);
len = stun_agent_finish_message (&agent, &msg, NULL, 0);
assert (len > 0);
val = getsockname (servfd, (struct sockaddr *)&addr, &addrlen);
assert (val == 0);
- val = stun_usage_bind_process (&msg, &addr, &addrlen, &addr, &addrlen);
+ val = stun_usage_bind_process (&msg, (struct sockaddr *) &addr, &addrlen,
+ (struct sockaddr *) &addr, &addrlen);
assert (val == STUN_USAGE_BIND_RETURN_SUCCESS);
/* End */