From d644fc64407dcd14ffcee6a0e9fbe28ee3a4e9bd Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Fri, 15 Aug 2008 23:45:02 -0500 Subject: Second Life viewer sources 1.18.0.6 --- linden/indra/llmessage/lliosocket.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'linden/indra/llmessage/lliosocket.cpp') diff --git a/linden/indra/llmessage/lliosocket.cpp b/linden/indra/llmessage/lliosocket.cpp index 8bc347c..fdb4a89 100644 --- a/linden/indra/llmessage/lliosocket.cpp +++ b/linden/indra/llmessage/lliosocket.cpp @@ -421,6 +421,7 @@ LLIOPipe::EStatus LLIOSocketWriter::process_impl( PUMP_DEBUG; apr_size_t len; bool done = false; + apr_status_t status = APR_SUCCESS; while(it != end) { @@ -428,9 +429,8 @@ LLIOPipe::EStatus LLIOSocketWriter::process_impl( if((*it).isOnChannel(channels.in())) { PUMP_DEBUG; - // *FIX: check return code - sockets will fail (broken, etc.) len = (apr_size_t)segment.size(); - apr_status_t status = apr_socket_send( + status = apr_socket_send( mDestination->getSocket(), (const char*)segment.data(), &len); @@ -438,12 +438,12 @@ LLIOPipe::EStatus LLIOSocketWriter::process_impl( // completed immediately' error from apr_socket_send. In this // case we break and the data will be sent the next time the chain // is pumped. -#if LL_WINDOWS - if (status == 730035) + if(APR_STATUS_IS_EAGAIN(status)) + { + ll_apr_warn_status(status); break; -#else - (void) status; -#endif + } + mLastWritten = segment.data() + len - 1; PUMP_DEBUG; -- cgit v1.1