mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 11:45:36 +02:00
fix error reporting during UDPSocket send
This commit is contained in:
parent
1e4213b676
commit
f39cbd0246
1 changed files with 2 additions and 2 deletions
|
@ -12,6 +12,7 @@
|
|||
#include <fcntl.h>
|
||||
#include <cstdio>
|
||||
#include <errno.h>
|
||||
#include <err.h>
|
||||
|
||||
sockaddr_in destSockaddr, senderAddress;
|
||||
|
||||
|
@ -68,8 +69,7 @@ int UDPSocket::send(sockaddr_in *destAddress, const void *data, size_t byteLengt
|
|||
0, (sockaddr *) destAddress, sizeof(sockaddr_in));
|
||||
|
||||
if (sent_bytes != byteLength) {
|
||||
std::cout << strerror(errno) << "\n";
|
||||
printf("Failed to send packet: return value = %d\n", sent_bytes);
|
||||
printf("Failed to send packet: %s\n", strerror(errno));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue