diff options
-rw-r--r-- | stun/tests/test-bind.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/stun/tests/test-bind.c b/stun/tests/test-bind.c index 3f6e773..0c7646f 100644 --- a/stun/tests/test-bind.c +++ b/stun/tests/test-bind.c @@ -232,7 +232,8 @@ static void bad_responses (void) 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 */ @@ -241,7 +242,8 @@ static void bad_responses (void) /* 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); @@ -310,7 +312,8 @@ static void responses (void) 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 */ @@ -340,7 +343,8 @@ static void responses (void) 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 */ @@ -362,7 +366,7 @@ static void responses (void) 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); @@ -372,7 +376,8 @@ static void responses (void) 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 */ |