aboutsummaryrefslogtreecommitdiff
path: root/src/connection.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/connection.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/connection.cpp b/src/connection.cpp
index a277ea7..5b79dfe 100644
--- a/src/connection.cpp
+++ b/src/connection.cpp
@@ -238,7 +238,7 @@ bool Connection::readInput()
238 return true; 238 return true;
239} 239}
240 240
241bool Connection::readInput( int nSec, int nUSec ) 241bool Connection::readInput( int nSec, int nUSec, int *pnSecBack, int *pnUSecBack )
242{ 242{
243 fd_set rfds; 243 fd_set rfds;
244 struct timeval tv; 244 struct timeval tv;
@@ -252,7 +252,9 @@ bool Connection::readInput( int nSec, int nUSec )
252 tv.tv_usec = nUSec; 252 tv.tv_usec = nUSec;
253 253
254 retval = select( nSocket+1, &rfds, NULL, NULL, &tv ); 254 retval = select( nSocket+1, &rfds, NULL, NULL, &tv );
255 /* Don't rely on the value of tv now! */ 255
256 if( pnSecBack ) (*pnSecBack) = tv.tv_sec;
257 if( pnUSecBack ) (*pnUSecBack) = tv.tv_usec;
256 258
257 if (retval == -1) 259 if (retval == -1)
258 { 260 {