diff options
author | Madeleine Nilsson <madni@cendio.se> | 2024-11-04 15:00:43 +0100 |
---|---|---|
committer | Madeleine Nilsson <madni@cendio.se> | 2024-11-21 17:38:35 +0100 |
commit | 0af41e7fed978f934f3dc6ca8c99599a212467c5 (patch) | |
tree | b59907e4e0c4bbbef45346794a890f17009c117f /common/rdr | |
parent | 5b74bf1bbd4aef9f71ef76b718c79fe7b09bf5f5 (diff) | |
download | tigervnc-0af41e7fed978f934f3dc6ca8c99599a212467c5.tar.gz tigervnc-0af41e7fed978f934f3dc6ca8c99599a212467c5.zip |
Capitalize first letter in log, exception & error
The reason for this is to keep a consistency through out the project.
Diffstat (limited to 'common/rdr')
-rw-r--r-- | common/rdr/RandomStream.cxx | 10 | ||||
-rw-r--r-- | common/rdr/ZlibOutStream.cxx | 8 |
2 files changed, 9 insertions, 9 deletions
diff --git a/common/rdr/RandomStream.cxx b/common/rdr/RandomStream.cxx index 449a84c0..b045d48a 100644 --- a/common/rdr/RandomStream.cxx +++ b/common/rdr/RandomStream.cxx @@ -50,11 +50,11 @@ RandomStream::RandomStream() if (GetLastError() == (DWORD)NTE_BAD_KEYSET) { if (!CryptAcquireContext(&provider, nullptr, nullptr, PROV_RSA_FULL, CRYPT_NEWKEYSET)) { - vlog.error("unable to create keyset"); + vlog.error("Unable to create keyset"); provider = 0; } } else { - vlog.error("unable to acquire context"); + vlog.error("Unable to acquire context"); provider = 0; } } @@ -69,7 +69,7 @@ RandomStream::RandomStream() { #endif #endif - vlog.error("no OS supplied random source - using rand()"); + vlog.error("No OS supplied random source, using rand()"); seed += (unsigned int) time(nullptr) + getpid() + getpid() * 987654 + rand(); srand(seed); } @@ -89,7 +89,7 @@ bool RandomStream::fillBuffer() { #ifdef RFB_HAVE_WINCRYPT if (provider) { if (!CryptGenRandom(provider, availSpace(), (uint8_t*)end)) - throw rdr::Win32Exception("unable to CryptGenRandom", GetLastError()); + throw rdr::Win32Exception("Unable to CryptGenRandom", GetLastError()); end += availSpace(); } else { #else @@ -97,7 +97,7 @@ bool RandomStream::fillBuffer() { if (fp) { size_t n = fread((uint8_t*)end, 1, availSpace(), fp); if (n <= 0) - throw rdr::PosixException("reading /dev/urandom or /dev/random failed", + throw rdr::PosixException("Reading /dev/urandom or /dev/random failed", errno); end += n; } else { diff --git a/common/rdr/ZlibOutStream.cxx b/common/rdr/ZlibOutStream.cxx index 0b167711..f62eb22a 100644 --- a/common/rdr/ZlibOutStream.cxx +++ b/common/rdr/ZlibOutStream.cxx @@ -97,7 +97,7 @@ bool ZlibOutStream::flushBuffer() zs->avail_in = ptr - sentUpTo; #ifdef ZLIBOUT_DEBUG - vlog.debug("flush: avail_in %d",zs->avail_in); + vlog.debug("Flush: avail_in %d",zs->avail_in); #endif // Force out everything from the zlib encoder @@ -124,7 +124,7 @@ void ZlibOutStream::deflate(int flush) zs->avail_out = chunk = underlying->avail(); #ifdef ZLIBOUT_DEBUG - vlog.debug("calling deflate, avail_in %d, avail_out %d", + vlog.debug("Calling deflate, avail_in %d, avail_out %d", zs->avail_in,zs->avail_out); #endif @@ -138,7 +138,7 @@ void ZlibOutStream::deflate(int flush) } #ifdef ZLIBOUT_DEBUG - vlog.debug("after deflate: %d bytes", + vlog.debug("After deflate: %d bytes", zs->next_out-underlying->getptr()); #endif @@ -152,7 +152,7 @@ void ZlibOutStream::checkCompressionLevel() if (newLevel != compressionLevel) { #ifdef ZLIBOUT_DEBUG - vlog.debug("change: avail_in %d",zs->avail_in); + vlog.debug("Change: avail_in %d",zs->avail_in); #endif // zlib is just horribly stupid. It does an implicit flush on |