Commit fbfb7fb3 authored by Pekka Pessi's avatar Pekka Pessi

su.h, su.c, stun.c: fixed su_recvfrom() prototype.

darcs-hash:20060920142436-65a35-fcb5ffe655d09d47e4115f02d2a9c7f9d25e89c4.gz
parent a40597c3
......@@ -1720,7 +1720,7 @@ static int stun_bind_callback(stun_magic_t *m, su_wait_t *w, su_wakeup_arg_t *ar
/* receive response */
recv_len = sizeof(recv);
dgram_len = su_recvfrom(s, dgram, sizeof(dgram), 0, (struct sockaddr *)(&recv), &recv_len);
dgram_len = su_recvfrom(s, dgram, sizeof(dgram), 0, &recv, &recv_len);
err = errno;
if ((dgram_len < 0) && (err != EAGAIN)) {
/* su_wait_destroy(w); */
......
......@@ -219,9 +219,9 @@ typedef size_t su_ioveclen_t;
#endif
#if SU_HAVE_WINSOCK
/* WSABUF */
/* This is same as WSABUF */
struct su_iovec_s {
usize_t siv_len;
u_long siv_len;
void *siv_base;
};
typedef u_long su_ioveclen_t;
......@@ -283,7 +283,7 @@ SOFIAPUBFUN ssize_t
su_sockaddr_t const *to, socklen_t tolen),
su_recv(su_socket_t s, void *buffer, size_t length, int flags),
su_recvfrom(su_socket_t s, void *buffer, size_t length, int flags,
struct sockaddr *from, socklen_t *fromlen);
su_sockaddr_t *from, socklen_t *fromlen);
#else
#define su_send(s,b,l,f) send((s),(b),(l),(f))
#define su_sendto(s,b,l,f,a,L) sendto((s),(b),(l),(f),(void const*)(a),(L))
......
......@@ -236,7 +236,7 @@ ssize_t su_recv(su_socket_t s, void *buffer, size_t length, int flags)
}
ssize_t su_recvfrom(su_socket_t s, void *buffer, size_t length, int flags,
struct sockaddr *from, socklen_t *fromlen)
su_sockaddr_t *from, socklen_t *fromlen)
{
int retval, ilen;
......@@ -247,7 +247,7 @@ ssize_t su_recvfrom(su_socket_t s, void *buffer, size_t length, int flags,
length = INT_MAX;
retval = recvfrom(s, buffer, (int)length, flags,
from, fromlen ? &ilen : NULL);
(void *)from, fromlen ? &ilen : NULL);
if (fromlen)
*fromlen = ilen;
......
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