diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/network/TcpSocket.cxx | 24 | ||||
-rw-r--r-- | common/network/UnixSocket.cxx | 12 | ||||
-rw-r--r-- | common/rdr/RandomStream.cxx | 10 | ||||
-rw-r--r-- | common/rdr/ZlibOutStream.cxx | 8 | ||||
-rw-r--r-- | common/rfb/CConnection.cxx | 18 | ||||
-rw-r--r-- | common/rfb/CMsgReader.cxx | 4 | ||||
-rw-r--r-- | common/rfb/CSecurityTLS.cxx | 4 | ||||
-rw-r--r-- | common/rfb/Configuration.cxx | 12 | ||||
-rw-r--r-- | common/rfb/SConnection.cxx | 8 | ||||
-rw-r--r-- | common/rfb/SSecurityVncAuth.cxx | 6 | ||||
-rw-r--r-- | common/rfb/Timer.cxx | 2 | ||||
-rw-r--r-- | common/rfb/VNCSConnectionST.cxx | 4 |
12 files changed, 56 insertions, 56 deletions
diff --git a/common/network/TcpSocket.cxx b/common/network/TcpSocket.cxx index 3f2f0f1f..76055abb 100644 --- a/common/network/TcpSocket.cxx +++ b/common/network/TcpSocket.cxx @@ -217,7 +217,7 @@ const char* TcpSocket::getPeerAddress() { socklen_t sa_size = sizeof(sa); if (getpeername(getFd(), &sa.u.sa, &sa_size) != 0) { - vlog.error("unable to get peer name for socket"); + vlog.error("Unable to get peer name for socket"); return "(N/A)"; } @@ -231,7 +231,7 @@ const char* TcpSocket::getPeerAddress() { buffer + 1, sizeof(buffer) - 2, nullptr, 0, NI_NUMERICHOST); if (ret != 0) { - vlog.error("unable to convert peer name to a string"); + vlog.error("Unable to convert peer name to a string"); return "(N/A)"; } @@ -245,14 +245,14 @@ const char* TcpSocket::getPeerAddress() { name = inet_ntoa(sa.u.sin.sin_addr); if (name == nullptr) { - vlog.error("unable to convert peer name to a string"); + vlog.error("Unable to convert peer name to a string"); return "(N/A)"; } return name; } - vlog.error("unknown address family for socket"); + vlog.error("Unknown address family for socket"); return ""; } @@ -281,7 +281,7 @@ bool TcpSocket::enableNagles(bool enable) { if (setsockopt(getFd(), IPPROTO_TCP, TCP_NODELAY, (char *)&one, sizeof(one)) < 0) { int e = errorNumber; - vlog.error("unable to setsockopt TCP_NODELAY: %d", e); + vlog.error("Unable to setsockopt TCP_NODELAY: %d", e); return false; } return true; @@ -299,7 +299,7 @@ TcpListener::TcpListener(const struct sockaddr *listenaddr, int sock; if ((sock = socket (listenaddr->sa_family, SOCK_STREAM, 0)) < 0) - throw SocketException("unable to create listening socket", errorNumber); + throw SocketException("Unable to create listening socket", errorNumber); memcpy (&sa, listenaddr, listenaddrlen); #ifdef IPV6_V6ONLY @@ -307,7 +307,7 @@ TcpListener::TcpListener(const struct sockaddr *listenaddr, if (setsockopt (sock, IPPROTO_IPV6, IPV6_V6ONLY, (char*)&one, sizeof(one))) { int e = errorNumber; closesocket(sock); - throw SocketException("unable to set IPV6_V6ONLY", e); + throw SocketException("Unable to set IPV6_V6ONLY", e); } } #endif /* defined(IPV6_V6ONLY) */ @@ -325,14 +325,14 @@ TcpListener::TcpListener(const struct sockaddr *listenaddr, (char *)&one, sizeof(one)) < 0) { int e = errorNumber; closesocket(sock); - throw SocketException("unable to create listening socket", e); + throw SocketException("Unable to create listening socket", e); } #endif if (bind(sock, &sa.u.sa, listenaddrlen) == -1) { int e = errorNumber; closesocket(sock); - throw SocketException("failed to bind socket", e); + throw SocketException("Failed to bind socket", e); } listen(sock); @@ -443,7 +443,7 @@ void network::createTcpListeners(std::list<SocketListener*> *listeners, snprintf (service, sizeof (service) - 1, "%d", port); service[sizeof (service) - 1] = '\0'; if ((result = getaddrinfo(addr, service, &hints, &ai)) != 0) - throw GAIException("unable to resolve listening address", result); + throw GAIException("Unable to resolve listening address", result); try { createTcpListeners(listeners, ai); @@ -630,7 +630,7 @@ TcpFilter::Pattern TcpFilter::parsePattern(const char* p) { } if ((result = getaddrinfo (parts[0].c_str(), nullptr, &hints, &ai)) != 0) { - throw GAIException("unable to resolve host by name", result); + throw GAIException("Unable to resolve host by name", result); } memcpy (&pattern.address.u.sa, ai->ai_addr, ai->ai_addrlen); @@ -641,7 +641,7 @@ TcpFilter::Pattern TcpFilter::parsePattern(const char* p) { if (parts.size() > 1) { if (family == AF_INET && (parts[1].find('.') != std::string::npos)) { - throw Exception("mask no longer supported for filter, " + throw Exception("Mask no longer supported for filter, " "use prefix instead"); } diff --git a/common/network/UnixSocket.cxx b/common/network/UnixSocket.cxx index 3a422b6c..fb631dae 100644 --- a/common/network/UnixSocket.cxx +++ b/common/network/UnixSocket.cxx @@ -69,7 +69,7 @@ UnixSocket::UnixSocket(const char *path) } if (result == -1) - throw SocketException("unable to connect to socket", err); + throw SocketException("Unable to connect to socket", err); setFd(sock); } @@ -84,7 +84,7 @@ const char* UnixSocket::getPeerAddress() { salen = sizeof(addr); if (getpeername(getFd(), (struct sockaddr *)&addr, &salen) != 0) { - vlog.error("unable to get peer name for socket"); + vlog.error("Unable to get peer name for socket"); return ""; } @@ -93,7 +93,7 @@ const char* UnixSocket::getPeerAddress() { salen = sizeof(addr); if (getsockname(getFd(), (struct sockaddr *)&addr, &salen) != 0) { - vlog.error("unable to get local name for socket"); + vlog.error("Unable to get local name for socket"); return ""; } @@ -120,7 +120,7 @@ UnixListener::UnixListener(const char *path, int mode) // - Create a socket if ((fd = socket(AF_UNIX, SOCK_STREAM, 0)) < 0) - throw SocketException("unable to create listening socket", errno); + throw SocketException("Unable to create listening socket", errno); // - Delete existing socket (ignore result) unlink(path); @@ -135,14 +135,14 @@ UnixListener::UnixListener(const char *path, int mode) umask(saved_umask); if (result < 0) { close(fd); - throw SocketException("unable to bind listening socket", err); + throw SocketException("Unable to bind listening socket", err); } // - Set socket mode if (chmod(path, mode) < 0) { err = errno; close(fd); - throw SocketException("unable to set socket mode", err); + throw SocketException("Unable to set socket mode", err); } listen(fd); 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 diff --git a/common/rfb/CConnection.cxx b/common/rfb/CConnection.cxx index b4017dba..a682b810 100644 --- a/common/rfb/CConnection.cxx +++ b/common/rfb/CConnection.cxx @@ -161,7 +161,7 @@ bool CConnection::processVersionMsg() int majorVersion; int minorVersion; - vlog.debug("reading protocol version"); + vlog.debug("Reading protocol version"); if (!is->hasData(12)) return false; @@ -209,7 +209,7 @@ bool CConnection::processVersionMsg() bool CConnection::processSecurityTypesMsg() { - vlog.debug("processing security types message"); + vlog.debug("Processing security types message"); int secType = secTypeInvalid; @@ -294,7 +294,7 @@ bool CConnection::processSecurityTypesMsg() bool CConnection::processSecurityMsg() { - vlog.debug("processing security message"); + vlog.debug("Processing security message"); if (!csecurity->processMsg()) return false; @@ -305,7 +305,7 @@ bool CConnection::processSecurityMsg() bool CConnection::processSecurityResultMsg() { - vlog.debug("processing security result message"); + vlog.debug("Processing security result message"); int result; if (server.beforeVersion(3,8) && csecurity->getType() == secTypeNone) { @@ -321,10 +321,10 @@ bool CConnection::processSecurityResultMsg() securityCompleted(); return true; case secResultFailed: - vlog.debug("auth failed"); + vlog.debug("Auth failed"); break; case secResultTooMany: - vlog.debug("auth failed - too many tries"); + vlog.debug("Auth failed: Too many tries"); break; default: throw Exception("Unknown security result from server"); @@ -341,7 +341,7 @@ bool CConnection::processSecurityResultMsg() bool CConnection::processSecurityReasonMsg() { - vlog.debug("processing security reason message"); + vlog.debug("Processing security reason message"); if (!is->hasData(4)) return false; @@ -363,7 +363,7 @@ bool CConnection::processSecurityReasonMsg() bool CConnection::processInitMsg() { - vlog.debug("reading server initialisation"); + vlog.debug("Reading server initialisation"); return reader_->readServerInit(); } @@ -460,7 +460,7 @@ void CConnection::serverInit(int width, int height, CMsgHandler::serverInit(width, height, pf, name); state_ = RFBSTATE_NORMAL; - vlog.debug("initialisation done"); + vlog.debug("Initialisation done"); initDone(); assert(framebuffer != nullptr); diff --git a/common/rfb/CMsgReader.cxx b/common/rfb/CMsgReader.cxx index 8bcdbfd0..5dbfa5be 100644 --- a/common/rfb/CMsgReader.cxx +++ b/common/rfb/CMsgReader.cxx @@ -277,7 +277,7 @@ bool CMsgReader::readServerCutText() if (len > (size_t)maxCutText) { is->skip(len); - vlog.error("cut text too long (%d bytes) - ignoring",len); + vlog.error("Cut text too long (%d bytes) - ignoring",len); return true; } @@ -477,7 +477,7 @@ bool CMsgReader::readRect(const Rect& r, int encoding) } if (r.is_empty()) - vlog.error("zero size rect"); + vlog.error("Zero size rect"); return handler->dataRect(r, encoding); } diff --git a/common/rfb/CSecurityTLS.cxx b/common/rfb/CSecurityTLS.cxx index 6eeb6a84..3b7868ba 100644 --- a/common/rfb/CSecurityTLS.cxx +++ b/common/rfb/CSecurityTLS.cxx @@ -316,11 +316,11 @@ void CSecurityTLS::checkSession() return; if (gnutls_certificate_type_get(session) != GNUTLS_CRT_X509) - throw Exception("unsupported certificate type"); + throw Exception("Unsupported certificate type"); err = gnutls_certificate_verify_peers2(session, &status); if (err != 0) { - vlog.error("server certificate verification failed: %s", gnutls_strerror(err)); + vlog.error("Server certificate verification failed: %s", gnutls_strerror(err)); throw rdr::TLSException("server certificate verification()", err); } diff --git a/common/rfb/Configuration.cxx b/common/rfb/Configuration.cxx index f58a9c2f..763a5635 100644 --- a/common/rfb/Configuration.cxx +++ b/common/rfb/Configuration.cxx @@ -236,7 +236,7 @@ bool VoidParameter::isBool() const { void VoidParameter::setImmutable() { - vlog.debug("set immutable %s", getName()); + vlog.debug("Set immutable %s", getName()); immutable = true; } @@ -270,7 +270,7 @@ bool AliasParameter::isBool() const { void AliasParameter::setImmutable() { - vlog.debug("set immutable %s (Alias)", getName()); + vlog.debug("Set immutable %s (Alias)", getName()); param->setImmutable(); } @@ -308,7 +308,7 @@ bool BoolParameter::setParam() { void BoolParameter::setParam(bool b) { if (immutable) return; value = b; - vlog.debug("set %s(Bool) to %d", getName(), value); + vlog.debug("Set %s(Bool) to %d", getName(), value); } std::string BoolParameter::getDefaultStr() const { @@ -345,7 +345,7 @@ IntParameter::setParam(const char* v) { bool IntParameter::setParam(int v) { if (immutable) return true; - vlog.debug("set %s(Int) to %d", getName(), v); + vlog.debug("Set %s(Int) to %d", getName(), v); if (v < minValue || v > maxValue) return false; value = v; @@ -388,7 +388,7 @@ bool StringParameter::setParam(const char* v) { if (immutable) return true; if (!v) throw rfb::Exception("setParam(<null>) not allowed"); - vlog.debug("set %s(String) to %s", getName(), v); + vlog.debug("Set %s(String) to %s", getName(), v); value = v; return true; } @@ -439,7 +439,7 @@ bool BinaryParameter::setParam(const char* v) { void BinaryParameter::setParam(const uint8_t* v, size_t len) { LOCK_CONFIG; if (immutable) return; - vlog.debug("set %s(Binary)", getName()); + vlog.debug("Set %s(Binary)", getName()); delete [] value; value = nullptr; length = 0; diff --git a/common/rfb/SConnection.cxx b/common/rfb/SConnection.cxx index 905f88a4..2b5c97bf 100644 --- a/common/rfb/SConnection.cxx +++ b/common/rfb/SConnection.cxx @@ -112,7 +112,7 @@ bool SConnection::processVersionMsg() int majorVersion; int minorVersion; - vlog.debug("reading protocol version"); + vlog.debug("Reading protocol version"); if (!is->hasData(12)) return false; @@ -193,7 +193,7 @@ bool SConnection::processVersionMsg() bool SConnection::processSecurityTypeMsg() { - vlog.debug("processing security type message"); + vlog.debug("Processing security type message"); if (!is->hasData(1)) return false; @@ -228,7 +228,7 @@ void SConnection::processSecurityType(int secType) bool SConnection::processSecurityMsg() { - vlog.debug("processing security message"); + vlog.debug("Processing security message"); try { if (!ssecurity->processMsg()) return false; @@ -272,7 +272,7 @@ bool SConnection::processSecurityFailure() bool SConnection::processInitMsg() { - vlog.debug("reading client initialisation"); + vlog.debug("Reading client initialisation"); return reader_->readClientInit(); } diff --git a/common/rfb/SSecurityVncAuth.cxx b/common/rfb/SSecurityVncAuth.cxx index 272c7ca1..6b369a6f 100644 --- a/common/rfb/SSecurityVncAuth.cxx +++ b/common/rfb/SSecurityVncAuth.cxx @@ -132,17 +132,17 @@ void VncAuthPasswdParameter::getVncAuthPasswd(std::string *password, std::string if (passwdFile) { const char *fname = *passwdFile; if (!fname[0]) { - vlog.info("neither %s nor %s params set", getName(), passwdFile->getName()); + vlog.info("Neither %s nor %s params set", getName(), passwdFile->getName()); return; } FILE* fp = fopen(fname, "r"); if (!fp) { - vlog.error("opening password file '%s' failed", fname); + vlog.error("Opening password file '%s' failed", fname); return; } - vlog.debug("reading password file"); + vlog.debug("Reading password file"); obfuscated.resize(8); obfuscated.resize(fread(obfuscated.data(), 1, 8, fp)); obfuscatedReadOnly.resize(8); diff --git a/common/rfb/Timer.cxx b/common/rfb/Timer.cxx index fbc9bae9..6f7ec7ba 100644 --- a/common/rfb/Timer.cxx +++ b/common/rfb/Timer.cxx @@ -99,7 +99,7 @@ int Timer::getNextTimeout() { return toWait; } // Time has jumped backwards! - vlog.info("time has moved backwards!"); + vlog.info("Time has moved backwards!"); pending.front()->dueTime = now; toWait = 0; } diff --git a/common/rfb/VNCSConnectionST.cxx b/common/rfb/VNCSConnectionST.cxx index 7dc2a0b8..ea918e8f 100644 --- a/common/rfb/VNCSConnectionST.cxx +++ b/common/rfb/VNCSConnectionST.cxx @@ -80,7 +80,7 @@ VNCSConnectionST::~VNCSConnectionST() { // If we reach here then VNCServerST is deleting us! if (!closeReason.empty()) - vlog.info("closing %s: %s", peerEndpoint.c_str(), + vlog.info("Closing %s: %s", peerEndpoint.c_str(), closeReason.c_str()); // Release any keys the client still had pressed @@ -120,7 +120,7 @@ void VNCSConnectionST::close(const char* reason) if (closeReason.empty()) closeReason = reason; else - vlog.debug("second close: %s (%s)", peerEndpoint.c_str(), reason); + vlog.debug("Second close: %s (%s)", peerEndpoint.c_str(), reason); try { if (sock->outStream().hasBufferedData()) { |