From: Madeleine Nilsson Date: Mon, 4 Nov 2024 14:00:43 +0000 (+0100) Subject: Capitalize first letter in log, exception & error X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=0af41e7fed978f934f3dc6ca8c99599a212467c5;p=tigervnc.git Capitalize first letter in log, exception & error The reason for this is to keep a consistency through out the project. --- 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 *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() 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()) { diff --git a/java/com/tigervnc/network/TcpSocket.java b/java/com/tigervnc/network/TcpSocket.java index 22e854f5..9863c723 100644 --- a/java/com/tigervnc/network/TcpSocket.java +++ b/java/com/tigervnc/network/TcpSocket.java @@ -185,7 +185,7 @@ public class TcpSocket extends Socket { try { sock.channel.socket().setTcpNoDelay(!enable); } catch(java.net.SocketException e) { - vlog.error("unable to setsockopt TCP_NODELAY: "+e.getMessage()); + vlog.error("Unable to setsockopt TCP_NODELAY: "+e.getMessage()); return false; } return true; diff --git a/java/com/tigervnc/rfb/AliasParameter.java b/java/com/tigervnc/rfb/AliasParameter.java index 3f20ae46..fe0672ee 100644 --- a/java/com/tigervnc/rfb/AliasParameter.java +++ b/java/com/tigervnc/rfb/AliasParameter.java @@ -40,7 +40,7 @@ public class AliasParameter extends VoidParameter { public boolean isBool() { return param.isBool(); } public void setImmutable() { - vlog.debug("set immutable "+getName()+" (Alias)"); + vlog.debug("Set immutable "+getName()+" (Alias)"); param.setImmutable(); } diff --git a/java/com/tigervnc/rfb/CConnection.java b/java/com/tigervnc/rfb/CConnection.java index e0e669d8..b94346b9 100644 --- a/java/com/tigervnc/rfb/CConnection.java +++ b/java/com/tigervnc/rfb/CConnection.java @@ -160,7 +160,7 @@ abstract public class CConnection extends CMsgHandler { int majorVersion; int minorVersion; - vlog.debug("reading protocol version"); + vlog.debug("Reading protocol version"); if (!is.checkNoWait(12)) return; @@ -209,7 +209,7 @@ abstract public class CConnection extends CMsgHandler { private void processSecurityTypesMsg() { - vlog.debug("processing security types message"); + vlog.debug("Processing security types message"); int secType = Security.secTypeInvalid; @@ -292,7 +292,7 @@ abstract public class CConnection extends CMsgHandler { } private void processSecurityMsg() { - vlog.debug("processing security message"); + vlog.debug("Processing security message"); if (csecurity.processMsg(this)) { state_ = stateEnum.RFBSTATE_SECURITY_RESULT; processSecurityResultMsg(); @@ -300,7 +300,7 @@ abstract public class CConnection extends CMsgHandler { } private void processSecurityResultMsg() { - vlog.debug("processing security result message"); + vlog.debug("Processing security result message"); int result; if (server.beforeVersion(3,8) && csecurity.getType() == Security.secTypeNone) { result = Security.secResultOK; @@ -313,10 +313,10 @@ abstract public class CConnection extends CMsgHandler { securityCompleted(); return; case Security.secResultFailed: - vlog.debug("auth failed"); + vlog.debug("Auth failed"); break; case Security.secResultTooMany: - vlog.debug("auth failed - too many tries"); + vlog.debug("Auth failed: Too many tries"); break; default: throw new Exception("Unknown security result from server"); @@ -329,7 +329,7 @@ abstract public class CConnection extends CMsgHandler { } private void processInitMsg() { - vlog.debug("reading server initialisation"); + vlog.debug("Reading server initialisation"); reader_.readServerInit(); } @@ -411,7 +411,7 @@ abstract public class CConnection extends CMsgHandler { super.serverInit(width, height, pf, name); state_ = stateEnum.RFBSTATE_NORMAL; - vlog.debug("initialisation done"); + vlog.debug("Initialisation done"); initDone(); assert(framebuffer != null); diff --git a/java/com/tigervnc/rfb/CMsgReader.java b/java/com/tigervnc/rfb/CMsgReader.java index c71a1e02..52e61e6f 100644 --- a/java/com/tigervnc/rfb/CMsgReader.java +++ b/java/com/tigervnc/rfb/CMsgReader.java @@ -81,8 +81,8 @@ public class CMsgReader { readEndOfContinuousUpdates(); break; default: - vlog.error("unknown message type "+type); - throw new Exception("unknown message type"); + vlog.error("Unknown message type "+type); + throw new Exception("Unknown message type"); } } else { int x = is.readU16(); @@ -154,7 +154,7 @@ public class CMsgReader { if (len > 256*1024) { is.skip(len); - vlog.error("cut text too long ("+len+" bytes) - ignoring"); + vlog.error("Cut text too long ("+len+" bytes) - ignoring"); return; } diff --git a/java/com/tigervnc/rfb/IntParameter.java b/java/com/tigervnc/rfb/IntParameter.java index dcad04a8..ddc8baf4 100644 --- a/java/com/tigervnc/rfb/IntParameter.java +++ b/java/com/tigervnc/rfb/IntParameter.java @@ -40,7 +40,7 @@ public class IntParameter extends VoidParameter { public boolean setParam(String v) { if (immutable) return true; - vlog.debug("set "+getName()+"(Int) to "+v); + vlog.debug("Set "+getName()+"(Int) to "+v); try { int i; i = Integer.parseInt(v); @@ -55,7 +55,7 @@ public class IntParameter extends VoidParameter { public boolean setParam(int v) { if (immutable) return true; - vlog.debug("set "+getName()+"(Int) to "+v); + vlog.debug("Set "+getName()+"(Int) to "+v); if (v < minValue || v > maxValue) return false; value = v; diff --git a/java/com/tigervnc/rfb/VoidParameter.java b/java/com/tigervnc/rfb/VoidParameter.java index 2af0a81d..529c790d 100644 --- a/java/com/tigervnc/rfb/VoidParameter.java +++ b/java/com/tigervnc/rfb/VoidParameter.java @@ -61,7 +61,7 @@ abstract public class VoidParameter { abstract public String getValueStr(); public boolean isBool() { return false; } public void setImmutable() { - vlog.debug("set immutable "+getName()); + vlog.debug("Set immutable "+getName()); immutable = true; } diff --git a/java/com/tigervnc/vncviewer/CConn.java b/java/com/tigervnc/vncviewer/CConn.java index 11b6da44..ff22206d 100644 --- a/java/com/tigervnc/vncviewer/CConn.java +++ b/java/com/tigervnc/vncviewer/CConn.java @@ -113,10 +113,10 @@ public class CConn extends CConnection implements Tunnel.createTunnel(gatewayHost, getServerName(), getServerPort(), localPort); sock = new TcpSocket("localhost", localPort); - vlog.info("connected to localhost port "+localPort); + vlog.info("Connected to localhost port "+localPort); } else { sock = new TcpSocket(getServerName(), getServerPort()); - vlog.info("connected to host "+getServerName()+" port "+getServerPort()); + vlog.info("Connected to host "+getServerName()+" port "+getServerPort()); } } catch (java.lang.Exception e) { throw new Exception(e.getMessage()); @@ -126,7 +126,7 @@ public class CConn extends CConnection implements if (listenMode.getValue()) vlog.info("Accepted connection from " + name); else - vlog.info("connected to host "+Hostname.getHost(name)+" port "+Hostname.getPort(name)); + vlog.info("Connected to host "+Hostname.getHost(name)+" port "+Hostname.getPort(name)); } // See callback below diff --git a/java/com/tigervnc/vncviewer/Viewport.java b/java/com/tigervnc/vncviewer/Viewport.java index e12ef2a6..c293cb7d 100644 --- a/java/com/tigervnc/vncviewer/Viewport.java +++ b/java/com/tigervnc/vncviewer/Viewport.java @@ -168,7 +168,7 @@ class Viewport extends JPanel implements ActionListener { if (data[i*4 + 3] != 0) break; if ((i == width*height) && dotWhenNoCursor.getValue()) { - vlog.debug("cursor is empty - using dot"); + vlog.debug("Cursor is empty: Using dot"); cursor = new BufferedImage(5, 5, BufferedImage.TYPE_INT_ARGB_PRE); cursor.setRGB(0, 0, 5, 5, dotcursor_xpm, 0, 5); cursorHotspot.x = cursorHotspot.y = 3; diff --git a/unix/vncconfig/vncconfig.cxx b/unix/vncconfig/vncconfig.cxx index 1498bbdb..545271ce 100644 --- a/unix/vncconfig/vncconfig.cxx +++ b/unix/vncconfig/vncconfig.cxx @@ -112,7 +112,7 @@ public: void handleEvent(TXWindow* /*w*/, XEvent* ev) override { if (ev->type == vncExtEventBase + VncExtQueryConnectNotify) { - vlog.debug("query connection event"); + vlog.debug("Query connection event"); if (queryConnectDialog) delete queryConnectDialog; queryConnectDialog = nullptr; diff --git a/unix/x0vncserver/Image.cxx b/unix/x0vncserver/Image.cxx index c2026134..bd48c88d 100644 --- a/unix/x0vncserver/Image.cxx +++ b/unix/x0vncserver/Image.cxx @@ -80,7 +80,7 @@ void Image::Init(int width, int height) Visual* vis = DefaultVisual(dpy, DefaultScreen(dpy)); if (vis->c_class != TrueColor) { - vlog.error("pseudocolour not supported"); + vlog.error("Pseudocolour not supported"); exit(1); } @@ -251,7 +251,7 @@ void ShmImage::Init(int width, int height, const XVisualInfo *vinfo) } if (visual->c_class != TrueColor) { - vlog.error("pseudocolour not supported"); + vlog.error("Pseudocolour not supported"); exit(1); } diff --git a/unix/xserver/hw/vnc/XserverDesktop.cc b/unix/xserver/hw/vnc/XserverDesktop.cc index 5e81ee9b..c872a6ba 100644 --- a/unix/xserver/hw/vnc/XserverDesktop.cc +++ b/unix/xserver/hw/vnc/XserverDesktop.cc @@ -333,7 +333,7 @@ bool XserverDesktop::handleListenerEvent(int fd, return false; Socket* sock = (*i)->accept(); - vlog.debug("new client, sock %d", sock->getFd()); + vlog.debug("New client, sock %d", sock->getFd()); sockserv->addSocket(sock); vncSetNotifyFd(sock->getFd(), screenIndex, true, false); @@ -380,7 +380,7 @@ void XserverDesktop::blockHandler(int* timeout) for (i = sockets.begin(); i != sockets.end(); i++) { int fd = (*i)->getFd(); if ((*i)->isShutdown()) { - vlog.debug("client gone, sock %d",fd); + vlog.debug("Client gone, sock %d",fd); vncRemoveNotifyFd(fd); server->removeSocket(*i); vncClientGone(fd); @@ -413,14 +413,14 @@ void XserverDesktop::blockHandler(int* timeout) void XserverDesktop::addClient(Socket* sock, bool reverse, bool viewOnly) { - vlog.debug("new client, sock %d reverse %d",sock->getFd(),reverse); + vlog.debug("New client, sock %d reverse %d",sock->getFd(),reverse); server->addSocket(sock, reverse, viewOnly ? AccessView : AccessDefault); vncSetNotifyFd(sock->getFd(), screenIndex, true, false); } void XserverDesktop::disconnectClients() { - vlog.debug("disconnecting all clients"); + vlog.debug("Disconnecting all clients"); return server->closeClients("Disconnection from server end"); } diff --git a/unix/xserver/hw/vnc/vncExtInit.cc b/unix/xserver/hw/vnc/vncExtInit.cc index 073b07e2..7576619e 100644 --- a/unix/xserver/hw/vnc/vncExtInit.cc +++ b/unix/xserver/hw/vnc/vncExtInit.cc @@ -141,7 +141,7 @@ static PixelFormat vncGetPixelFormat(int scrIdx) &redMask, &greenMask, &blueMask); if (!trueColour) { - vlog.error("pseudocolour not supported"); + vlog.error("Pseudocolour not supported"); abort(); } @@ -263,12 +263,12 @@ void vncExtensionInit(void) vncGetScreenHeight(), vncFbptr[scr], vncFbstride[scr]); - vlog.info("created VNC server for screen %d", scr); + vlog.info("Created VNC server for screen %d", scr); if (scr == 0 && vncInetdSock != -1 && listeners.empty()) { network::Socket* sock = new network::TcpSocket(vncInetdSock); desktop[scr]->addClient(sock, false, false); - vlog.info("added inetd sock"); + vlog.info("Added inetd sock"); } } diff --git a/vncviewer/Viewport.cxx b/vncviewer/Viewport.cxx index e29c877c..71eafe51 100644 --- a/vncviewer/Viewport.cxx +++ b/vncviewer/Viewport.cxx @@ -260,7 +260,7 @@ void Viewport::setCursor(int width, int height, const Point& hotspot, if (data[i*4 + 3] != 0) break; if ((i == width*height) && dotWhenNoCursor) { - vlog.debug("cursor is empty - using dot"); + vlog.debug("Cursor is empty, using dot"); Fl_Pixmap pxm(dotcursor_xpm); cursor = new Fl_RGB_Image(&pxm); diff --git a/vncviewer/vncviewer.cxx b/vncviewer/vncviewer.cxx index 84406470..b6f30494 100644 --- a/vncviewer/vncviewer.cxx +++ b/vncviewer/vncviewer.cxx @@ -264,7 +264,7 @@ static void CleanupSignalHandler(int sig) { // CleanupSignalHandler allows C++ object cleanup to happen because it calls // exit() rather than the default which is to abort. - vlog.info(_("Termination signal %d has been received. TigerVNC Viewer will now exit."), sig); + vlog.info(_("Termination signal %d has been received. TigerVNC viewer will now exit."), sig); exit(1); } diff --git a/win/rfb_win32/CleanDesktop.cxx b/win/rfb_win32/CleanDesktop.cxx index 6d933b22..3eb66bd1 100644 --- a/win/rfb_win32/CleanDesktop.cxx +++ b/win/rfb_win32/CleanDesktop.cxx @@ -61,7 +61,7 @@ struct ActiveDesktop { HRESULT hr = handle->GetDesktopItem(i, &item, 0); if (hr != S_OK) { - vlog.error("unable to GetDesktopItem %d: %ld", i, hr); + vlog.error("Unable to GetDesktopItem %d: %ld", i, hr); return false; } item.fChecked = enable_; @@ -105,7 +105,7 @@ struct ActiveDesktop { if (hr == S_OK) modifyComponents = (adOptions.fActiveDesktop==0) != (enable_==false); if (hr != S_OK) { - vlog.error("failed to get/set Active Desktop options: %ld", hr); + vlog.error("Failed to get/set Active Desktop options: %ld", hr); return false; } @@ -122,7 +122,7 @@ struct ActiveDesktop { int itemCount = 0; hr = handle->GetDesktopItemCount(&itemCount, 0); if (hr != S_OK) { - vlog.error("failed to get desktop item count: %ld", hr); + vlog.error("Failed to get desktop item count: %ld", hr); return false; } for (int i=0; inotifyClipboardChanged(IsClipboardFormatAvailable(CF_UNICODETEXT)); } @@ -149,18 +149,18 @@ Clipboard::setClipText(const char* text) { throw rdr::Win32Exception("unable to set Win32 clipboard", GetLastError()); clip_handle = nullptr; - vlog.debug("set clipboard"); + vlog.debug("Set clipboard"); } catch (rdr::Exception& e) { vlog.debug("%s", e.str()); } // - Close the clipboard if (!CloseClipboard()) - vlog.debug("unable to close Win32 clipboard: %lu", GetLastError()); + vlog.debug("Unable to close Win32 clipboard: %lu", GetLastError()); else - vlog.debug("closed clipboard"); + vlog.debug("Closed clipboard"); if (clip_handle) { - vlog.debug("freeing clipboard handle"); + vlog.debug("Freeing clipboard handle"); GlobalFree(clip_handle); } } diff --git a/win/rfb_win32/CurrentUser.cxx b/win/rfb_win32/CurrentUser.cxx index fc0f689e..1607f0b1 100644 --- a/win/rfb_win32/CurrentUser.cxx +++ b/win/rfb_win32/CurrentUser.cxx @@ -41,7 +41,7 @@ BOOL CALLBACK enumWindows(HWND hwnd, LPARAM lParam) { char className[16]; if (GetClassName(hwnd, className, sizeof(className)) && (strcmp(className, shellIconClass) == 0)) { - vlog.debug("located tray icon window (%s)", className); + vlog.debug("Located tray icon window (%s)", className); DWORD processId = 0; GetWindowThreadProcessId(hwnd, &processId); if (!processId) @@ -51,7 +51,7 @@ BOOL CALLBACK enumWindows(HWND hwnd, LPARAM lParam) { return TRUE; if (!OpenProcessToken(process, MAXIMUM_ALLOWED, (HANDLE*)lParam)) return TRUE; - vlog.debug("obtained user token"); + vlog.debug("Obtained user token"); return FALSE; } return TRUE; @@ -59,14 +59,14 @@ BOOL CALLBACK enumWindows(HWND hwnd, LPARAM lParam) { BOOL CALLBACK enumDesktops(LPTSTR lpszDesktop, LPARAM lParam) { HDESK desktop = OpenDesktop(lpszDesktop, 0, FALSE, DESKTOP_ENUMERATE); - vlog.debug("opening \"%s\"", lpszDesktop); + vlog.debug("Opening \"%s\"", lpszDesktop); if (!desktop) { - vlog.info("desktop \"%s\" inaccessible", lpszDesktop); + vlog.info("Desktop \"%s\" inaccessible", lpszDesktop); return TRUE; } BOOL result = EnumDesktopWindows(desktop, enumWindows, lParam); if (!CloseDesktop(desktop)) - vlog.info("unable to close desktop: %ld", GetLastError()); + vlog.info("Unable to close desktop: %ld", GetLastError()); return result; } diff --git a/win/rfb_win32/DIBSectionBuffer.cxx b/win/rfb_win32/DIBSectionBuffer.cxx index ca6f3c9a..1b2a1b44 100644 --- a/win/rfb_win32/DIBSectionBuffer.cxx +++ b/win/rfb_win32/DIBSectionBuffer.cxx @@ -90,11 +90,11 @@ void DIBSectionBuffer::initBuffer(const PixelFormat& pf, int w, int h) { vlog.debug("recreateBuffer()"); } else { - vlog.debug("one of area or format not set"); + vlog.debug("One of area or format not set"); } if (new_bitmap && bitmap) { - vlog.debug("preserving bitmap contents"); + vlog.debug("Preserving bitmap contents"); // Copy the contents across if (device) { @@ -137,7 +137,7 @@ void DIBSectionBuffer::initBuffer(const PixelFormat& pf, int w, int h) { if (bytesPerRow % 4) { bytesPerRow += 4 - (bytesPerRow % 4); new_stride = (bytesPerRow * 8) / format.bpp; - vlog.info("adjusting DIB stride: %d to %d", w, new_stride); + vlog.info("Adjusting DIB stride: %d to %d", w, new_stride); } setBuffer(w, h, new_data, new_stride); diff --git a/win/rfb_win32/DeviceContext.cxx b/win/rfb_win32/DeviceContext.cxx index fa0beaf9..e6dc8508 100644 --- a/win/rfb_win32/DeviceContext.cxx +++ b/win/rfb_win32/DeviceContext.cxx @@ -86,7 +86,7 @@ PixelFormat DeviceContext::getPF(HDC dc) { bMask = 0x0000ff; break; default: - vlog.error("bits per pixel %u not supported", bi.bmiHeader.biBitCount); + vlog.error("Bits per pixel %u not supported", bi.bmiHeader.biBitCount); throw rdr::Exception("unknown bits per pixel specified"); }; break; diff --git a/win/rfb_win32/DeviceFrameBuffer.cxx b/win/rfb_win32/DeviceFrameBuffer.cxx index ca2f57d4..eaed650c 100644 --- a/win/rfb_win32/DeviceFrameBuffer.cxx +++ b/win/rfb_win32/DeviceFrameBuffer.cxx @@ -256,7 +256,7 @@ void DeviceFrameBuffer::setCursor(HCURSOR hCursor, VNCServer* server) } if (doOutline) { - vlog.debug("drawing cursor outline!"); + vlog.debug("Drawing cursor outline!"); // The buffer needs to be slightly larger to make sure there // is room for the outline pixels diff --git a/win/rfb_win32/Dialog.cxx b/win/rfb_win32/Dialog.cxx index 35ec065e..3d2edc9b 100644 --- a/win/rfb_win32/Dialog.cxx +++ b/win/rfb_win32/Dialog.cxx @@ -306,7 +306,7 @@ bool PropSheet::showPropSheet(HWND owner_, bool showApply, bool showCtxtHelp, bo } char filename[256]; sprintf(filename, "%s\\%s.bmp", tmpdir, title); - vlog.debug("writing to %s", filename); + vlog.debug("Writing to %s", filename); saveBMP(filename, &fb); i++; } diff --git a/win/rfb_win32/MonitorInfo.cxx b/win/rfb_win32/MonitorInfo.cxx index 854b467a..f35ef69e 100644 --- a/win/rfb_win32/MonitorInfo.cxx +++ b/win/rfb_win32/MonitorInfo.cxx @@ -45,9 +45,9 @@ static void fillMonitorInfo(HMONITOR monitor, MONITORINFOEXA* mi) { mi->cbSize = sizeof(MONITORINFOEXA); if (!GetMonitorInfo(monitor, mi)) throw rdr::Win32Exception("failed to GetMonitorInfo", GetLastError()); - vlog.debug("monitor is %ld,%ld-%ld,%ld", mi->rcMonitor.left, mi->rcMonitor.top, mi->rcMonitor.right, mi->rcMonitor.bottom); - vlog.debug("work area is %ld,%ld-%ld,%ld", mi->rcWork.left, mi->rcWork.top, mi->rcWork.right, mi->rcWork.bottom); - vlog.debug("device is \"%s\"", mi->szDevice); + vlog.debug("Monitor is %ld,%ld-%ld,%ld", mi->rcMonitor.left, mi->rcMonitor.top, mi->rcMonitor.right, mi->rcMonitor.bottom); + vlog.debug("Work area is %ld,%ld-%ld,%ld", mi->rcWork.left, mi->rcWork.top, mi->rcWork.right, mi->rcWork.bottom); + vlog.debug("Device is \"%s\"", mi->szDevice); } diff --git a/win/rfb_win32/MsgWindow.cxx b/win/rfb_win32/MsgWindow.cxx index e94b60a8..8f15c41d 100644 --- a/win/rfb_win32/MsgWindow.cxx +++ b/win/rfb_win32/MsgWindow.cxx @@ -55,14 +55,14 @@ LRESULT CALLBACK MsgWindowProc(HWND wnd, UINT msg, WPARAM wParam, LPARAM lParam) SetWindowLongPtr(wnd, GWLP_USERDATA, 0); MsgWindow* _this = (MsgWindow*) GetWindowLongPtr(wnd, GWLP_USERDATA); if (!_this) { - vlog.info("null _this in %p, message %x", wnd, msg); + vlog.info("Null _this in %p, message %x", wnd, msg); return SafeDefWindowProc(wnd, msg, wParam, lParam); } try { result = _this->processMessage(msg, wParam, lParam); } catch (rdr::Exception& e) { - vlog.error("untrapped: %s", e.str()); + vlog.error("Untrapped: %s", e.str()); } return result; @@ -99,20 +99,20 @@ static MsgWindowClass baseClass; // MsgWindow::MsgWindow(const char* name_) : name(name_), handle(nullptr) { - vlog.debug("creating window \"%s\"", name.c_str()); + vlog.debug("Creating window \"%s\"", name.c_str()); handle = CreateWindow((const char*)(intptr_t)baseClass.classAtom, name.c_str(), WS_OVERLAPPED, 0, 0, 10, 10, nullptr, nullptr, baseClass.instance, this); if (!handle) { throw rdr::Win32Exception("unable to create WMNotifier window instance", GetLastError()); } - vlog.debug("created window \"%s\" (%p)", name.c_str(), handle); + vlog.debug("Created window \"%s\" (%p)", name.c_str(), handle); } MsgWindow::~MsgWindow() { if (handle) DestroyWindow(handle); - vlog.debug("destroyed window \"%s\" (%p)", name.c_str(), handle); + vlog.debug("Destroyed window \"%s\" (%p)", name.c_str(), handle); } LRESULT diff --git a/win/rfb_win32/RegConfig.cxx b/win/rfb_win32/RegConfig.cxx index fc006b21..d95166f4 100644 --- a/win/rfb_win32/RegConfig.cxx +++ b/win/rfb_win32/RegConfig.cxx @@ -67,7 +67,7 @@ void RegConfig::loadRegistryConfig(RegKey& key) { if (!name) break; std::string value = key.getRepresentation(name); if (!Configuration::setParam(name, value.c_str())) - vlog.info("unable to process %s", name); + vlog.info("Unable to process %s", name); } } catch (rdr::Win32Exception& e) { if (e.err != ERROR_INVALID_HANDLE) @@ -76,7 +76,7 @@ void RegConfig::loadRegistryConfig(RegKey& key) { } void RegConfig::processEvent(HANDLE /*event*/) { - vlog.info("registry changed"); + vlog.info("Registry changed"); // Reinstate the registry change notifications ResetEvent(event); diff --git a/win/rfb_win32/Registry.cxx b/win/rfb_win32/Registry.cxx index bbe15f47..4aa0e013 100644 --- a/win/rfb_win32/Registry.cxx +++ b/win/rfb_win32/Registry.cxx @@ -55,7 +55,7 @@ RegKey::RegKey(const HKEY k) : key(nullptr), freeKey(false), valueName(nullptr), LONG result = RegOpenKeyEx(k, nullptr, 0, KEY_ALL_ACCESS, &key); if (result != ERROR_SUCCESS) throw rdr::Win32Exception("RegOpenKeyEx(HKEY)", result); - vlog.debug("duplicated %p to %p", k, key); + vlog.debug("Duplicated %p to %p", k, key); freeKey = true; } @@ -63,7 +63,7 @@ RegKey::RegKey(const RegKey& k) : key(nullptr), freeKey(false), valueName(nullpt LONG result = RegOpenKeyEx(k.key, nullptr, 0, KEY_ALL_ACCESS, &key); if (result != ERROR_SUCCESS) throw rdr::Win32Exception("RegOpenKeyEx(RegKey&)", result); - vlog.debug("duplicated %p to %p", k.key, key); + vlog.debug("Duplicated %p to %p", k.key, key); freeKey = true; } diff --git a/win/rfb_win32/SDisplay.cxx b/win/rfb_win32/SDisplay.cxx index 0ec5e231..1c269dd5 100644 --- a/win/rfb_win32/SDisplay.cxx +++ b/win/rfb_win32/SDisplay.cxx @@ -103,7 +103,7 @@ void SDisplay::init(VNCServer* vs) void SDisplay::start() { - vlog.debug("starting"); + vlog.debug("Starting"); // Try to make session zero the console session if (!inConsoleSession()) @@ -112,26 +112,26 @@ void SDisplay::start() // Start the SDisplay core startCore(); - vlog.debug("started"); + vlog.debug("Started"); if (statusLocation) *statusLocation = true; } void SDisplay::stop() { - vlog.debug("stopping"); + vlog.debug("Stopping"); // If we successfully start()ed then perform the DisconnectAction if (core) { CurrentUserToken cut; if (stricmp(disconnectAction, "Logoff") == 0) { if (!cut.h) - vlog.info("ignoring DisconnectAction=Logoff - no current user"); + vlog.info("Ignoring DisconnectAction=Logoff - no current user"); else ExitWindowsEx(EWX_LOGOFF, 0); } else if (stricmp(disconnectAction, "Lock") == 0) { if (!cut.h) { - vlog.info("ignoring DisconnectAction=Lock - no current user"); + vlog.info("Ignoring DisconnectAction=Lock - no current user"); } else { LockWorkStation(); } @@ -142,7 +142,7 @@ void SDisplay::stop() server->setPixelBuffer(nullptr); stopCore(); - vlog.debug("stopped"); + vlog.debug("Stopped"); if (statusLocation) *statusLocation = false; } @@ -279,14 +279,14 @@ bool SDisplay::isRestartRequired() { void SDisplay::restartCore() { - vlog.info("restarting"); + vlog.info("Restarting"); // Stop the existing Core related resources stopCore(); try { // Start a new Core if possible startCore(); - vlog.info("restarted"); + vlog.info("Restarted"); } catch (rdr::Exception& e) { // If startCore() fails then we MUST disconnect all clients, // to cause the server to stop() the desktop. @@ -352,7 +352,7 @@ bool SDisplay::checkLedState() { void SDisplay::notifyClipboardChanged(bool available) { - vlog.debug("clipboard text changed"); + vlog.debug("Clipboard text changed"); if (server) server->announceClipboard(available); } @@ -362,15 +362,15 @@ void SDisplay::notifyDisplayEvent(WMMonitor::Notifier::DisplayEventType evt) { switch (evt) { case WMMonitor::Notifier::DisplaySizeChanged: - vlog.debug("desktop size changed"); + vlog.debug("Desktop size changed"); recreatePixelBuffer(); break; case WMMonitor::Notifier::DisplayPixelFormatChanged: - vlog.debug("desktop format changed"); + vlog.debug("Desktop format changed"); recreatePixelBuffer(); break; default: - vlog.error("unknown display event received"); + vlog.error("Unknown display event received"); } } @@ -382,7 +382,7 @@ SDisplay::processEvent(HANDLE event) { // - If the SDisplay isn't even started then quit now if (!core) { - vlog.error("not start()ed"); + vlog.error("Not start()ed"); return; } @@ -480,14 +480,14 @@ SDisplay::recreatePixelBuffer(bool force) { flushChangeTracker(); // Delete the old pixelbuffer and device context - vlog.debug("deleting old pixel buffer & device"); + vlog.debug("Deleting old pixel buffer & device"); if (pb) delete pb; if (device) delete device; // Create a DeviceFrameBuffer attached to the new device - vlog.debug("creating pixel buffer"); + vlog.debug("Creating pixel buffer"); DeviceFrameBuffer* new_buffer = new DeviceFrameBuffer(*new_device); // Replace the old PixelBuffer diff --git a/win/rfb_win32/SInput.cxx b/win/rfb_win32/SInput.cxx index 258eb057..ae78ca66 100644 --- a/win/rfb_win32/SInput.cxx +++ b/win/rfb_win32/SInput.cxx @@ -412,7 +412,7 @@ void win32::SKeyboard::keyEvent(uint32_t keysym, uint32_t keycode, bool down) SHORT dc = VkKeyScan(keysym); if (dc != -1) { if (down) { - vlog.info("latin-1 dead key: 0x%x vkCode 0x%x mod 0x%x " + vlog.info("Latin-1 dead key: 0x%x vkCode 0x%x mod 0x%x " "followed by space", keysym, LOBYTE(dc), HIBYTE(dc)); doKeyEventWithModifiers(LOBYTE(dc), HIBYTE(dc), true); doKeyEventWithModifiers(LOBYTE(dc), HIBYTE(dc), false); @@ -438,7 +438,7 @@ void win32::SKeyboard::keyEvent(uint32_t keysym, uint32_t keycode, bool down) SHORT dc = VkKeyScan(latin1ToDeadChars[j].deadChar); SHORT bc = VkKeyScan(latin1ToDeadChars[j].baseChar); if (dc != -1 && bc != -1) { - vlog.info("latin-1 key: 0x%x dead key vkCode 0x%x mod 0x%x " + vlog.info("Latin-1 key: 0x%x dead key vkCode 0x%x mod 0x%x " "followed by vkCode 0x%x mod 0x%x", keysym, LOBYTE(dc), HIBYTE(dc), LOBYTE(bc), HIBYTE(bc)); @@ -454,14 +454,14 @@ void win32::SKeyboard::keyEvent(uint32_t keysym, uint32_t keycode, bool down) break; } } - vlog.info("ignoring unrecognised Latin-1 keysym 0x%x",keysym); + vlog.info("Ignoring unrecognised Latin-1 keysym 0x%x",keysym); } return; } BYTE vkCode = LOBYTE(s); BYTE modifierState = HIBYTE(s); - vlog.debug("latin-1 key: 0x%x vkCode 0x%x mod 0x%x down %d", + vlog.debug("Latin-1 key: 0x%x vkCode 0x%x mod 0x%x down %d", keysym, vkCode, modifierState, down); doKeyEventWithModifiers(vkCode, modifierState, down); @@ -470,7 +470,7 @@ void win32::SKeyboard::keyEvent(uint32_t keysym, uint32_t keycode, bool down) // see if it's a recognised keyboard key, otherwise ignore it if (vkMap.find(keysym) == vkMap.end()) { - vlog.info("ignoring unknown keysym 0x%x",keysym); + vlog.info("Ignoring unknown keysym 0x%x",keysym); return; } BYTE vkCode = vkMap[keysym]; @@ -478,7 +478,7 @@ void win32::SKeyboard::keyEvent(uint32_t keysym, uint32_t keycode, bool down) if (extendedMap[keysym]) flags |= KEYEVENTF_EXTENDEDKEY; if (!down) flags |= KEYEVENTF_KEYUP; - vlog.debug("keyboard key: keysym 0x%x vkCode 0x%x ext %d down %d", + vlog.debug("Keyboard key: keysym 0x%x vkCode 0x%x ext %d down %d", keysym, vkCode, extendedMap[keysym], down); if (down && (vkCode == VK_DELETE) && ((GetAsyncKeyState(VK_CONTROL) & 0x8000) != 0) && diff --git a/win/rfb_win32/Service.cxx b/win/rfb_win32/Service.cxx index dbbf6ab6..86e1dc5c 100644 --- a/win/rfb_win32/Service.cxx +++ b/win/rfb_win32/Service.cxx @@ -72,19 +72,19 @@ VOID WINAPI serviceHandler(DWORD control) { // -=- Service main procedure VOID WINAPI serviceProc(DWORD dwArgc, LPTSTR* lpszArgv) { - vlog.debug("entering %s serviceProc", service->getName()); - vlog.info("registering handler..."); + vlog.debug("Entering %s serviceProc", service->getName()); + vlog.info("Registering handler..."); service->status_handle = RegisterServiceCtrlHandler(service->getName(), serviceHandler); if (!service->status_handle) { DWORD err = GetLastError(); - vlog.error("failed to register handler: %lu", err); + vlog.error("Failed to register handler: %lu", err); ExitProcess(err); } - vlog.debug("registered handler (%p)", service->status_handle); + vlog.debug("Registered handler (%p)", service->status_handle); service->setStatus(SERVICE_START_PENDING); - vlog.debug("entering %s serviceMain", service->getName()); + vlog.debug("Entering %s serviceMain", service->getName()); service->status.dwWin32ExitCode = service->serviceMain(dwArgc, lpszArgv); - vlog.debug("leaving %s serviceMain", service->getName()); + vlog.debug("Leaving %s serviceMain", service->getName()); service->setStatus(SERVICE_STOPPED); } @@ -110,12 +110,12 @@ Service::start() { entry[0].lpServiceProc = serviceProc; entry[1].lpServiceName = nullptr; entry[1].lpServiceProc = nullptr; - vlog.debug("entering dispatcher"); + vlog.debug("Entering dispatcher"); if (!SetProcessShutdownParameters(0x100, 0)) - vlog.error("unable to set shutdown parameters: %lu", GetLastError()); + vlog.error("Unable to set shutdown parameters: %lu", GetLastError()); service = this; if (!StartServiceCtrlDispatcher(entry)) - throw Win32Exception("unable to start service", GetLastError()); + throw Win32Exception("Unable to start service", GetLastError()); } void @@ -134,9 +134,9 @@ Service::setStatus(DWORD state) { if (!SetServiceStatus(status_handle, &status)) { status.dwCurrentState = SERVICE_STOPPED; status.dwWin32ExitCode = GetLastError(); - vlog.error("unable to set service status:%lu", status.dwWin32ExitCode); + vlog.error("Unable to set service status:%lu", status.dwWin32ExitCode); } - vlog.debug("set status to %lu(%lu)", state, status.dwCheckPoint); + vlog.debug("Set status to %lu(%lu)", state, status.dwCheckPoint); } Service::~Service() { @@ -162,7 +162,7 @@ switchToDesktop(HDESK desktop) { return false; } if (!CloseDesktop(old_desktop)) - vlog.debug("unable to close old desktop:%lu", GetLastError()); + vlog.debug("Unable to close old desktop:%lu", GetLastError()); return true; } @@ -176,7 +176,7 @@ inputDesktopSelected() { DESKTOP_WRITEOBJECTS | DESKTOP_READOBJECTS | DESKTOP_SWITCHDESKTOP | GENERIC_WRITE); if (!input) { - vlog.debug("unable to OpenInputDesktop(1):%lu", GetLastError()); + vlog.debug("Unable to OpenInputDesktop(1):%lu", GetLastError()); return false; } @@ -185,17 +185,17 @@ inputDesktopSelected() { char inputname[256]; if (!GetUserObjectInformation(current, UOI_NAME, currentname, 256, &size)) { - vlog.debug("unable to GetUserObjectInformation(1):%lu", GetLastError()); + vlog.debug("Unable to GetUserObjectInformation(1):%lu", GetLastError()); CloseDesktop(input); return false; } if (!GetUserObjectInformation(input, UOI_NAME, inputname, 256, &size)) { - vlog.debug("unable to GetUserObjectInformation(2):%lu", GetLastError()); + vlog.debug("Unable to GetUserObjectInformation(2):%lu", GetLastError()); CloseDesktop(input); return false; } if (!CloseDesktop(input)) - vlog.debug("unable to close input desktop:%lu", GetLastError()); + vlog.debug("Unable to close input desktop:%lu", GetLastError()); // *** vlog.debug("current=%s, input=%s", currentname, inputname); bool result = strcmp(currentname, inputname) == 0; @@ -212,7 +212,7 @@ selectInputDesktop() { DESKTOP_WRITEOBJECTS | DESKTOP_READOBJECTS | DESKTOP_SWITCHDESKTOP | GENERIC_WRITE); if (!desktop) { - vlog.debug("unable to OpenInputDesktop(2):%lu", GetLastError()); + vlog.debug("Unable to OpenInputDesktop(2):%lu", GetLastError()); return false; } @@ -226,11 +226,11 @@ selectInputDesktop() { DWORD size = 256; char currentname[256]; if (GetUserObjectInformation(desktop, UOI_NAME, currentname, 256, &size)) { - vlog.debug("switched to %s", currentname); + vlog.debug("Switched to %s", currentname); } // *** - vlog.debug("switched to input desktop"); + vlog.debug("Switched to input desktop"); return true; } @@ -335,7 +335,7 @@ bool rfb::win32::registerService(const char* name, // - Open the SCM ServiceHandle scm = OpenSCManager(nullptr, nullptr, SC_MANAGER_CREATE_SERVICE); if (!scm) - throw rdr::Win32Exception("unable to open Service Control Manager", GetLastError()); + throw rdr::Win32Exception("Unable to open service control manager", GetLastError()); // - Add the service ServiceHandle handle = CreateService(scm, @@ -344,7 +344,7 @@ bool rfb::win32::registerService(const char* name, SERVICE_AUTO_START, SERVICE_ERROR_IGNORE, cmdline.c_str(), nullptr, nullptr, nullptr, nullptr, nullptr); if (!handle) - throw rdr::Win32Exception("unable to create service", GetLastError()); + throw rdr::Win32Exception("Unable to create service", GetLastError()); // - Set a description SERVICE_DESCRIPTION sdesc = {(LPTSTR)desc}; @@ -380,14 +380,14 @@ bool rfb::win32::unregisterService(const char* name) { // - Open the SCM ServiceHandle scm = OpenSCManager(nullptr, nullptr, SC_MANAGER_CREATE_SERVICE); if (!scm) - throw rdr::Win32Exception("unable to open Service Control Manager", GetLastError()); + throw rdr::Win32Exception("Unable to open service control manager", GetLastError()); // - Create the service ServiceHandle handle = OpenService(scm, name, SC_MANAGER_ALL_ACCESS); if (!handle) - throw rdr::Win32Exception("unable to locate the service", GetLastError()); + throw rdr::Win32Exception("Unable to locate the service", GetLastError()); if (!DeleteService(handle)) - throw rdr::Win32Exception("unable to remove the service", GetLastError()); + throw rdr::Win32Exception("Unable to remove the service", GetLastError()); // - Register the event log source RegKey hk; @@ -407,16 +407,16 @@ bool rfb::win32::startService(const char* name) { // - Open the SCM ServiceHandle scm = OpenSCManager(nullptr, nullptr, SC_MANAGER_CONNECT); if (!scm) - throw rdr::Win32Exception("unable to open Service Control Manager", GetLastError()); + throw rdr::Win32Exception("Unable to open service control manager", GetLastError()); // - Locate the service ServiceHandle handle = OpenService(scm, name, SERVICE_START); if (!handle) - throw rdr::Win32Exception("unable to open the service", GetLastError()); + throw rdr::Win32Exception("Unable to open the service", GetLastError()); // - Start the service if (!StartService(handle, 0, nullptr)) - throw rdr::Win32Exception("unable to start the service", GetLastError()); + throw rdr::Win32Exception("Unable to start the service", GetLastError()); Sleep(500); @@ -427,17 +427,17 @@ bool rfb::win32::stopService(const char* name) { // - Open the SCM ServiceHandle scm = OpenSCManager(nullptr, nullptr, SC_MANAGER_CONNECT); if (!scm) - throw rdr::Win32Exception("unable to open Service Control Manager", GetLastError()); + throw rdr::Win32Exception("Unable to open service control manager", GetLastError()); // - Locate the service ServiceHandle handle = OpenService(scm, name, SERVICE_STOP); if (!handle) - throw rdr::Win32Exception("unable to open the service", GetLastError()); + throw rdr::Win32Exception("Unable to open the service", GetLastError()); // - Start the service SERVICE_STATUS status; if (!ControlService(handle, SERVICE_CONTROL_STOP, &status)) - throw rdr::Win32Exception("unable to stop the service", GetLastError()); + throw rdr::Win32Exception("Unable to stop the service", GetLastError()); Sleep(500); @@ -448,17 +448,17 @@ DWORD rfb::win32::getServiceState(const char* name) { // - Open the SCM ServiceHandle scm = OpenSCManager(nullptr, nullptr, SC_MANAGER_CONNECT); if (!scm) - throw rdr::Win32Exception("unable to open Service Control Manager", GetLastError()); + throw rdr::Win32Exception("Unable to open service control manager", GetLastError()); // - Locate the service ServiceHandle handle = OpenService(scm, name, SERVICE_INTERROGATE); if (!handle) - throw rdr::Win32Exception("unable to open the service", GetLastError()); + throw rdr::Win32Exception("Unable to open the service", GetLastError()); // - Get the service status SERVICE_STATUS status; if (!ControlService(handle, SERVICE_CONTROL_INTERROGATE, (SERVICE_STATUS*)&status)) - throw rdr::Win32Exception("unable to query the service", GetLastError()); + throw rdr::Win32Exception("Unable to query the service", GetLastError()); return status.dwCurrentState; } diff --git a/win/rfb_win32/SocketManager.cxx b/win/rfb_win32/SocketManager.cxx index 2bc2f53e..9fdecb94 100644 --- a/win/rfb_win32/SocketManager.cxx +++ b/win/rfb_win32/SocketManager.cxx @@ -201,7 +201,7 @@ void SocketManager::processEvent(HANDLE event) { ListenInfo li = listeners[event]; // Accept an incoming connection - vlog.debug("accepting incoming connection"); + vlog.debug("Accepting incoming connection"); // What kind of event is this? WSANETWORKEVENTS network_events; @@ -215,13 +215,13 @@ void SocketManager::processEvent(HANDLE event) { if (new_sock) addSocket(new_sock, li.server, false); } else if (network_events.lNetworkEvents & FD_CLOSE) { - vlog.info("deleting listening socket"); + vlog.info("Deleting listening socket"); remListener(li.sock); } else if (network_events.lNetworkEvents & FD_ADDRESS_LIST_CHANGE) { li.notifier->processAddressChange(); requestAddressChangeEvents(li.sock); } else { - vlog.error("unknown listener event: %lx", network_events.lNetworkEvents); + vlog.error("Unknown listener event: %lx", network_events.lNetworkEvents); } } else if (connections.count(event)) { ConnInfo ci = connections[event]; @@ -234,7 +234,7 @@ void SocketManager::processEvent(HANDLE event) { // Fetch why this event notification triggered if (WSAEnumNetworkEvents(ci.sock->getFd(), event, &network_events) == SOCKET_ERROR) - throw rdr::SocketException("unable to get WSAEnumNetworkEvents:%u", WSAGetLastError()); + throw rdr::SocketException("Unable to get WSAEnumNetworkEvents:%u", WSAGetLastError()); // Cancel event notification for this socket if (WSAEventSelect(ci.sock->getFd(), event, 0) == SOCKET_ERROR) diff --git a/win/rfb_win32/WMHooks.cxx b/win/rfb_win32/WMHooks.cxx index cb2e0275..e1840eef 100644 --- a/win/rfb_win32/WMHooks.cxx +++ b/win/rfb_win32/WMHooks.cxx @@ -136,14 +136,14 @@ static bool StartHookThread() { return true; if (hooksLibrary == nullptr) return false; - vlog.debug("creating thread"); + vlog.debug("Creating thread"); hook_mgr = new WMHooksThread(); hook_mgr->start(); while (hook_mgr->getThreadId() == (DWORD)-1) Sleep(0); - vlog.debug("installing hooks"); + vlog.debug("Installing hooks"); if (!WM_Hooks_Install(hook_mgr->getThreadId(), 0)) { - vlog.error("failed to initialise hooks"); + vlog.error("Failed to initialise hooks"); hook_mgr->stop(); delete hook_mgr; hook_mgr = nullptr; @@ -157,7 +157,7 @@ static void StopHookThread() { return; if (!hooks.empty()) return; - vlog.debug("closing thread"); + vlog.debug("Closing thread"); hook_mgr->stop(); delete hook_mgr; hook_mgr = nullptr; @@ -165,7 +165,7 @@ static void StopHookThread() { static bool AddHook(WMHooks* hook) { - vlog.debug("adding hook"); + vlog.debug("Adding hook"); os::AutoMutex a(&hook_mgr_lock); if (!StartHookThread()) return false; @@ -175,7 +175,7 @@ static bool AddHook(WMHooks* hook) { static bool RemHook(WMHooks* hook) { { - vlog.debug("removing hook"); + vlog.debug("Removing hook"); os::AutoMutex a(&hook_mgr_lock); hooks.remove(hook); } @@ -216,7 +216,7 @@ WMHooksThread::worker() { Region updates[2]; int activeRgn = 0; - vlog.debug("starting hook thread"); + vlog.debug("Starting hook thread"); thread_id = GetCurrentThreadId(); @@ -291,16 +291,16 @@ WMHooksThread::worker() { } } - vlog.debug("stopping hook thread - processed %d events", count); + vlog.debug("Stopping hook thread - processed %d events", count); WM_Hooks_Remove(getThreadId()); } void WMHooksThread::stop() { - vlog.debug("stopping WMHooks thread"); + vlog.debug("Stopping WMHooks thread"); active = false; PostThreadMessage(thread_id, WM_QUIT, 0, 0); - vlog.debug("waiting for WMHooks thread"); + vlog.debug("Waiting for WMHooks thread"); wait(); } diff --git a/win/vncconfig/Connections.h b/win/vncconfig/Connections.h index a540bd76..68a4980d 100644 --- a/win/vncconfig/Connections.h +++ b/win/vncconfig/Connections.h @@ -89,7 +89,7 @@ namespace rfb { ConnectionsPage(const RegKey& rk) : PropSheetPage(GetModuleHandle(nullptr), MAKEINTRESOURCE(IDD_CONNECTIONS)), regKey(rk) {} void initDialog() override { - vlog.debug("set IDC_PORT %d", (int)port_number); + vlog.debug("Set IDC_PORT %d", (int)port_number); setItemInt(IDC_PORT, port_number ? port_number : 5900); setItemChecked(IDC_RFB_ENABLE, port_number != 0); setItemInt(IDC_IDLE_TIMEOUT, rfb::Server::idleTimeout); diff --git a/win/vncconfig/Legacy.cxx b/win/vncconfig/Legacy.cxx index 9300bb05..5c9dac3a 100644 --- a/win/vncconfig/Legacy.cxx +++ b/win/vncconfig/Legacy.cxx @@ -143,10 +143,10 @@ void LegacyPage::LoadPrefs() try { RegKey userKey; userKey.openKey(winvnc3, "Default"); - vlog.info("loading Default prefs"); + vlog.info("Loading default prefs"); LoadUserPrefs(userKey); } catch(rdr::Exception& e) { - vlog.error("error reading Default settings:%s", e.str()); + vlog.error("Error reading default settings:%s", e.str()); } // Open the local, user-specific settings @@ -154,10 +154,10 @@ void LegacyPage::LoadPrefs() try { RegKey userKey; userKey.openKey(winvnc3, username.c_str()); - vlog.info("loading local User prefs"); + vlog.info("Loading local user prefs"); LoadUserPrefs(userKey); } catch(rdr::Exception& e) { - vlog.error("error reading local User settings:%s", e.str()); + vlog.error("Error reading local user settings:%s", e.str()); } // Open the user's own settings @@ -165,10 +165,10 @@ void LegacyPage::LoadPrefs() try { RegKey userKey; userKey.openKey(HKEY_CURRENT_USER, "Software\\ORL\\WinVNC3"); - vlog.info("loading global User prefs"); + vlog.info("Loading global user prefs"); LoadUserPrefs(userKey); } catch(rdr::Exception& e) { - vlog.error("error reading global User settings:%s", e.str()); + vlog.error("Error reading global user settings:%s", e.str()); } } } diff --git a/win/vncconfig/vncconfig.cxx b/win/vncconfig/vncconfig.cxx index b16ff1e4..606da68d 100644 --- a/win/vncconfig/vncconfig.cxx +++ b/win/vncconfig/vncconfig.cxx @@ -164,7 +164,7 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE /*prev*/, char* /*cmdLine*/, int /* PropSheet sheet(inst, propSheetTitle, pages, icon); #ifdef _DEBUG - vlog.debug("capture dialogs=%s", captureDialogs ? "true" : "false"); + vlog.debug("Capture dialogs=%s", captureDialogs ? "true" : "false"); sheet.showPropSheet(nullptr, true, false, captureDialogs); #else sheet.showPropSheet(nullptr, true, false); diff --git a/win/winvnc/ManagedListener.cxx b/win/winvnc/ManagedListener.cxx index adc074cf..3a56205c 100644 --- a/win/winvnc/ManagedListener.cxx +++ b/win/winvnc/ManagedListener.cxx @@ -48,7 +48,7 @@ ManagedListener::~ManagedListener() { void ManagedListener::setServer(rfb::VNCServer* svr) { if (svr == server) return; - vlog.info("set server to %p", svr); + vlog.info("Set server to %p", svr); server = svr; refresh(); } @@ -56,14 +56,14 @@ void ManagedListener::setServer(rfb::VNCServer* svr) { void ManagedListener::setPort(int port_, bool localOnly_) { if ((port_ == port) && (localOnly == localOnly_)) return; - vlog.info("set port to %d", port_); + vlog.info("Set port to %d", port_); port = port_; localOnly = localOnly_; refresh(); } void ManagedListener::setFilter(const char* filterStr) { - vlog.info("set filter to %s", filterStr); + vlog.info("Set filter to %s", filterStr); delete filter; filter = new network::TcpFilter(filterStr); if (!sockets.empty() && !localOnly) { diff --git a/win/winvnc/VNCServerWin32.cxx b/win/winvnc/VNCServerWin32.cxx index 845ee854..f5343977 100644 --- a/win/winvnc/VNCServerWin32.cxx +++ b/win/winvnc/VNCServerWin32.cxx @@ -327,7 +327,7 @@ void VNCServerWin32::processEvent(HANDLE event_) { break; default: - vlog.error("unknown command %d queued", command); + vlog.error("Unknown command %d queued", command); }; // Clear the command and signal completion diff --git a/win/winvnc/winvnc.cxx b/win/winvnc/winvnc.cxx index e2abae19..653ec675 100644 --- a/win/winvnc/winvnc.cxx +++ b/win/winvnc/winvnc.cxx @@ -199,9 +199,9 @@ static void processParams(int argc, char** argv) { } else if (strcasecmp(argv[i], "-noconsole") == 0) { close_console = true; - vlog.info("closing console"); + vlog.info("Closing console"); if (!FreeConsole()) - vlog.info("unable to close console:%lu", GetLastError()); + vlog.info("Unable to close console:%lu", GetLastError()); } else if ((strcasecmp(argv[i], "-help") == 0) || (strcasecmp(argv[i], "--help") == 0) ||