From: mtk Date: Wed, 16 Jun 2010 10:20:32 +0000 (+0000) Subject: handle ENOBUFS just like EAGAIN => return 0; X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=f1c9ab57a860991343408d3e077690f6073be0fe;p=senf.git handle ENOBUFS just like EAGAIN => return 0; git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@1637 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/senf/Socket/ReadWritePolicy.cc b/senf/Socket/ReadWritePolicy.cc index 9ca08ad..3c3138a 100644 --- a/senf/Socket/ReadWritePolicy.cc +++ b/senf/Socket/ReadWritePolicy.cc @@ -91,6 +91,9 @@ prefix_ unsigned senf::WriteablePolicy::do_write(FileHandle handle, char const * case EINTR: break; case EAGAIN: + case ENOBUFS: + // According to the man page this should not happen, since packets are just silently being dropped. + // It does happen in NetEmu using small TxQueues on WLAN interfaces case ECONNREFUSED: // Writing to a UDP socket seems return this error code if a corresponding ICMP // error code has been received before (at least on linux). This is inconsistent @@ -118,6 +121,9 @@ prefix_ unsigned senf::WriteablePolicy::do_writeto(FileHandle handle, case EINTR: break; case EAGAIN: + case ENOBUFS: + // According to the man page this should not happen, since packets are just silently being dropped. + // It does happen in NetEmu using small TxQueues on WLAN interfaces rv = 0; break; default: