diff options
author | Chris Wilson <chris+github@qwirx.com> | 2015-04-06 12:17:55 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2015-04-06 12:17:55 +0000 |
commit | 255ecd111f07ef793b225b8923af0b4b4b3c3a20 (patch) | |
tree | f0edc23785f3ec46450af74209d75225bc10e88f /lib | |
parent | f152abd45f13daf1425c0ee32bccfe0d2dd2a647 (diff) |
Whitespace and semicolon-after-macro fixes.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/common/Archive.h | 25 | ||||
-rw-r--r-- | lib/common/IOStream.cpp | 4 | ||||
-rw-r--r-- | lib/server/SocketStreamTLS.cpp | 2 |
3 files changed, 19 insertions, 12 deletions
diff --git a/lib/common/Archive.h b/lib/common/Archive.h index 87dd1d44..22711492 100644 --- a/lib/common/Archive.h +++ b/lib/common/Archive.h @@ -26,7 +26,7 @@ class Archive { public: Archive(IOStream &Stream, int Timeout) - : mrStream(Stream) + : mrStream(Stream) { mTimeout = Timeout; } @@ -38,6 +38,7 @@ public: ~Archive() { } + // // // @@ -104,7 +105,7 @@ public: 0 /* not interested in bytes read if this fails */, mTimeout)) { - THROW_EXCEPTION(CommonException, ArchiveBlockIncompleteRead) + THROW_EXCEPTION(CommonException, ArchiveBlockIncompleteRead); } rItemOut = ntohl(privItem); } @@ -125,7 +126,7 @@ public: else { // bad number of remaining bytes - THROW_EXCEPTION(CommonException, ArchiveBlockIncompleteRead) + THROW_EXCEPTION(CommonException, ArchiveBlockIncompleteRead); } } void Read(int64_t &rItemOut) @@ -135,7 +136,7 @@ public: 0 /* not interested in bytes read if this fails */, mTimeout)) { - THROW_EXCEPTION(CommonException, ArchiveBlockIncompleteRead) + THROW_EXCEPTION(CommonException, ArchiveBlockIncompleteRead); } rItemOut = box_ntoh64(privItem); } @@ -147,7 +148,7 @@ public: 0 /* not interested in bytes read if this fails */, mTimeout)) { - THROW_EXCEPTION(CommonException, ArchiveBlockIncompleteRead) + THROW_EXCEPTION(CommonException, ArchiveBlockIncompleteRead); } rItemOut = box_ntoh64(privItem); } @@ -167,9 +168,12 @@ public: if(size < (int) sizeof(buf)) { // Fetch rest of pPayload, relying on the Protocol to error on stupidly large sizes for us - if(!mrStream.ReadFullBuffer(buf, size, 0 /* not interested in bytes read if this fails */, mTimeout)) + if(!mrStream.ReadFullBuffer(buf, size, + 0 /* not interested in bytes read if this fails */, + mTimeout)) { - THROW_EXCEPTION(CommonException, ArchiveBlockIncompleteRead) + THROW_EXCEPTION(CommonException, + ArchiveBlockIncompleteRead); } // assign to this string, storing the header and the extra payload rItemOut.assign(buf, size); @@ -181,9 +185,12 @@ public: char *ppayload = dataB; // Fetch rest of pPayload, relying on the Protocol to error on stupidly large sizes for us - if(!mrStream.ReadFullBuffer(ppayload, size, 0 /* not interested in bytes read if this fails */, mTimeout)) + if(!mrStream.ReadFullBuffer(ppayload, size, + 0 /* not interested in bytes read if this fails */, + mTimeout)) { - THROW_EXCEPTION(CommonException, ArchiveBlockIncompleteRead) + THROW_EXCEPTION(CommonException, + ArchiveBlockIncompleteRead); } // assign to this string, storing the header and the extra pPayload rItemOut.assign(ppayload, size); diff --git a/lib/common/IOStream.cpp b/lib/common/IOStream.cpp index 98b42943..3e126d3f 100644 --- a/lib/common/IOStream.cpp +++ b/lib/common/IOStream.cpp @@ -127,8 +127,8 @@ int IOStream::ConvertSeekTypeToOSWhence(int SeekType) // Function // Name: IOStream::ReadFullBuffer(void *, int, int) // Purpose: Reads bytes into buffer, returning whether or not it managed to -// get all the bytes required. Exception and abort use of stream -// if this returns false. +// get all the bytes required. Exception and abort use of stream +// if this returns false. // Created: 2003/08/26 // // -------------------------------------------------------------------------- diff --git a/lib/server/SocketStreamTLS.cpp b/lib/server/SocketStreamTLS.cpp index 953012d1..e6299bfa 100644 --- a/lib/server/SocketStreamTLS.cpp +++ b/lib/server/SocketStreamTLS.cpp @@ -271,7 +271,7 @@ int SocketStreamTLS::Read(void *pBuffer, int NBytes, int Timeout) { return 0; } - + while(true) { int r = ::SSL_read(mpSSL, pBuffer, NBytes); |