aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2007-04-20 06:17:21 +0000
committerMike Buland <eichlan@xagasoft.com>2007-04-20 06:17:21 +0000
commit066282ae6de25cf92780dbdaa2fd70a033e95659 (patch)
treea20a38811a41fcb5523970e41dd52834f4e26488 /src
parent1fa3ca5f24c018126333ca2d6609730e1ae17386 (diff)
downloadlibbu++-066282ae6de25cf92780dbdaa2fd70a033e95659.tar.gz
libbu++-066282ae6de25cf92780dbdaa2fd70a033e95659.tar.bz2
libbu++-066282ae6de25cf92780dbdaa2fd70a033e95659.tar.xz
libbu++-066282ae6de25cf92780dbdaa2fd70a033e95659.zip
Fixed some goo in socket.
Diffstat (limited to '')
-rw-r--r--src/socket.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/socket.cpp b/src/socket.cpp
index e206bb5..c4f914b 100644
--- a/src/socket.cpp
+++ b/src/socket.cpp
@@ -181,11 +181,12 @@ void Bu::Socket::read()
181 181
182size_t Bu::Socket::read( void *pBuf, size_t nBytes ) 182size_t Bu::Socket::read( void *pBuf, size_t nBytes )
183{ 183{
184 read(); 184 int nRead = TEMP_FAILURE_RETRY( ::read( nSocket, pBuf, nBytes ) );
185 185 if( nRead < 0 )
186 186 {
187 187 throw ConnectionException( excodeReadError, strerror(errno) );
188 return sReadBuf.getSize(); 188 }
189 return nRead;
189} 190}
190 191
191size_t Bu::Socket::write( const void *pBuf, size_t nBytes ) 192size_t Bu::Socket::write( const void *pBuf, size_t nBytes )