diff options
author | Mauro Sardara <msardara@cisco.com> | 2019-03-11 19:19:15 +0100 |
---|---|---|
committer | Mauro Sardara <msardara@cisco.com> | 2019-03-12 11:04:38 +0100 |
commit | e1dbbf7e8e0b2d5101aa4e06d90f82cfab5087d2 (patch) | |
tree | eb7ecbc11044255e7f0a6508d746024f956fc273 /hicn-light | |
parent | f14470a4e352b15aea76a8c6176c409c595cf534 (diff) |
[HICN-106]
Added generation of .lib for dll shared libraries
fixed warning for shift in csum_fold function in libhicn
added declaration of external symbol in libtransport log.
Change-Id: I9377eb6016a74f14eb8f05df2ced36ee41a27bfd
Signed-off-by: Mauro Sardara <msardara@cisco.com>
Diffstat (limited to 'hicn-light')
-rw-r--r-- | hicn-light/src/io/udpConnection.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/hicn-light/src/io/udpConnection.c b/hicn-light/src/io/udpConnection.c index c3e6d32ac..5fbdf4998 100644 --- a/hicn-light/src/io/udpConnection.c +++ b/hicn-light/src/io/udpConnection.c @@ -287,13 +287,20 @@ static bool _sendCommandResponse(IoOperations *ops, struct iovec *message){ return false; } #else - ssize_t writeLength = write(udpConnState->udpListenerSocket, message[0].iov_base, (unsigned int)message[0].iov_len); - if (writeLength < 0) { - return false; + WSABUF dataBuf[2]; + DWORD BytesSent = 0; + + for (int i = 0; i < 2; i++) { + dataBuf[i].buf = message[i].iov_base; + dataBuf[i].len = (ULONG)message[i].iov_len; } - writeLength = write(udpConnState->udpListenerSocket, message[0].iov_base, (unsigned int)message[0].iov_len); - if (writeLength < 0) { - return false; + + int rc = WSASendTo(udpConnState->udpListenerSocket, dataBuf, 2, + &BytesSent, 0, (SOCKADDR *)udpConnState->peerAddress, + udpConnState->peerAddressLength, NULL, NULL); + + if (rc == SOCKET_ERROR) { + return false; } #endif return true; |