diff options
author | Mike Buland <eichlan@xagasoft.com> | 2007-04-20 06:17:21 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2007-04-20 06:17:21 +0000 |
commit | 066282ae6de25cf92780dbdaa2fd70a033e95659 (patch) | |
tree | a20a38811a41fcb5523970e41dd52834f4e26488 | |
parent | 1fa3ca5f24c018126333ca2d6609730e1ae17386 (diff) | |
download | libbu++-066282ae6de25cf92780dbdaa2fd70a033e95659.tar.gz libbu++-066282ae6de25cf92780dbdaa2fd70a033e95659.tar.bz2 libbu++-066282ae6de25cf92780dbdaa2fd70a033e95659.tar.xz libbu++-066282ae6de25cf92780dbdaa2fd70a033e95659.zip |
Fixed some goo in socket.
-rw-r--r-- | src/socket.cpp | 11 |
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 | ||
182 | size_t Bu::Socket::read( void *pBuf, size_t nBytes ) | 182 | size_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 | ||
191 | size_t Bu::Socket::write( const void *pBuf, size_t nBytes ) | 192 | size_t Bu::Socket::write( const void *pBuf, size_t nBytes ) |