X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=src%2Fcompat%2Fwindows%2Fwincompat.c;h=98bc2d788aac5222f4007b8d7cb5e76fb7103a2a;hb=de2b14e15ff63cfd0218691532e7c7e9153f7c04;hp=3e6417ef2d2115acf87b3fdc6640938393c076c3;hpb=5f7ef478c0571c3b833b4486bae73bd4b7ddbb3d;p=catta diff --git a/src/compat/windows/wincompat.c b/src/compat/windows/wincompat.c index 3e6417e..98bc2d7 100644 --- a/src/compat/windows/wincompat.c +++ b/src/compat/windows/wincompat.c @@ -138,6 +138,12 @@ ssize_t recvmsg(int sockfd, struct msghdr *msg, int flags) msg->msg_flags = (int)wsamsg.dwFlags; // all flags that fit into dwFlags also fit into msg_flags (see above) + // XXX debug, remove + { + char where[64]; + getnameinfo(msg->msg_name, msg->msg_namelen, where, sizeof(where), NULL, 0, NI_NUMERICHOST); + catta_log_debug("recvmsg: %u bytes from %s", (unsigned int)bytesrcvd, where); + } return bytesrcvd; } @@ -214,12 +220,18 @@ ssize_t sendmsg(int sockfd, const struct msghdr *msg, int flags) return -1; } + // XXX debug, remove + { + char where[64]; + getnameinfo(msg->msg_name, msg->msg_namelen, where, sizeof(where), NULL, 0, NI_NUMERICHOST); + catta_log_debug("sendmsg: %u bytes to %s", (unsigned int)bytessent, where); + } return bytessent; } int ioctl(int d, unsigned long request, int *p) { - u_long arg = 0; + u_long arg = *p; if(ioctlsocket(d, request, &arg) == SOCKET_ERROR) { errno = wsa_errno();