netty: check result of UDP sendto

This commit is contained in:
Christian Helmuth 2017-09-26 16:33:56 +02:00
parent 26eb0ce794
commit 88a3fda36a
1 changed files with 3 additions and 0 deletions

View File

@ -76,6 +76,9 @@ void Netty::Udp::server(int const sd, bool const nonblock, bool const read_write
}
count = sendto(sd, data, count, 0, pcaddr, scaddr);
if (count == -1)
Genode::error("sendto: errno=", errno,
" (", Genode::Cstring(strerror(errno)), ")");
Genode::log("echoed ", count, " bytes");
}