aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/network/TcpSocket.cxx24
-rw-r--r--common/network/UnixSocket.cxx12
-rw-r--r--common/rdr/RandomStream.cxx10
-rw-r--r--common/rdr/ZlibOutStream.cxx8
-rw-r--r--common/rfb/CConnection.cxx18
-rw-r--r--common/rfb/CMsgReader.cxx4
-rw-r--r--common/rfb/CSecurityTLS.cxx2
-rw-r--r--common/rfb/Configuration.cxx12
-rw-r--r--common/rfb/KeyRemapper.cxx4
-rw-r--r--common/rfb/SConnection.cxx8
-rw-r--r--common/rfb/SSecurityVncAuth.cxx6
-rw-r--r--common/rfb/TightEncoder.cxx2
-rw-r--r--common/rfb/TightJPEGEncoder.cxx2
-rw-r--r--common/rfb/Timer.cxx2
-rw-r--r--common/rfb/VNCSConnectionST.cxx4
-rw-r--r--common/rfb/VNCServerST.cxx2
16 files changed, 60 insertions, 60 deletions
diff --git a/common/network/TcpSocket.cxx b/common/network/TcpSocket.cxx
index bf603755..e37861f4 100644
--- a/common/network/TcpSocket.cxx
+++ b/common/network/TcpSocket.cxx
@@ -220,7 +220,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)";
}
@@ -234,7 +234,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)";
}
@@ -248,14 +248,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 "";
}
@@ -284,7 +284,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;
@@ -302,7 +302,7 @@ TcpListener::TcpListener(const struct sockaddr *listenaddr,
int sock;
if ((sock = socket (listenaddr->sa_family, SOCK_STREAM, 0)) < 0)
- throw socket_error("unable to create listening socket", errorNumber);
+ throw socket_error("Unable to create listening socket", errorNumber);
memcpy (&sa, listenaddr, listenaddrlen);
#ifdef IPV6_V6ONLY
@@ -310,7 +310,7 @@ TcpListener::TcpListener(const struct sockaddr *listenaddr,
if (setsockopt (sock, IPPROTO_IPV6, IPV6_V6ONLY, (char*)&one, sizeof(one))) {
int e = errorNumber;
closesocket(sock);
- throw socket_error("unable to set IPV6_V6ONLY", e);
+ throw socket_error("Unable to set IPV6_V6ONLY", e);
}
}
#endif /* defined(IPV6_V6ONLY) */
@@ -328,14 +328,14 @@ TcpListener::TcpListener(const struct sockaddr *listenaddr,
(char *)&one, sizeof(one)) < 0) {
int e = errorNumber;
closesocket(sock);
- throw socket_error("unable to create listening socket", e);
+ throw socket_error("Unable to create listening socket", e);
}
#endif
if (bind(sock, &sa.u.sa, listenaddrlen) == -1) {
int e = errorNumber;
closesocket(sock);
- throw socket_error("failed to bind socket", e);
+ throw socket_error("Failed to bind socket", e);
}
listen(sock);
@@ -446,7 +446,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 getaddrinfo_error("unable to resolve listening address", result);
+ throw getaddrinfo_error("Unable to resolve listening address", result);
try {
createTcpListeners(listeners, ai);
@@ -633,7 +633,7 @@ TcpFilter::Pattern TcpFilter::parsePattern(const char* p) {
}
if ((result = getaddrinfo (parts[0].c_str(), nullptr, &hints, &ai)) != 0) {
- throw getaddrinfo_error("unable to resolve host by name", result);
+ throw getaddrinfo_error("Unable to resolve host by name", result);
}
memcpy (&pattern.address.u.sa, ai->ai_addr, ai->ai_addrlen);
@@ -644,7 +644,7 @@ TcpFilter::Pattern TcpFilter::parsePattern(const char* p) {
if (parts.size() > 1) {
if (family == AF_INET &&
(parts[1].find('.') != std::string::npos)) {
- throw std::invalid_argument("mask no longer supported for "
+ throw std::invalid_argument("Mask no longer supported for "
"filter, use prefix instead");
}
diff --git a/common/network/UnixSocket.cxx b/common/network/UnixSocket.cxx
index c8517300..fb017a53 100644
--- a/common/network/UnixSocket.cxx
+++ b/common/network/UnixSocket.cxx
@@ -72,7 +72,7 @@ UnixSocket::UnixSocket(const char *path)
}
if (result == -1)
- throw socket_error("unable to connect to socket", err);
+ throw socket_error("Unable to connect to socket", err);
setFd(sock);
}
@@ -87,7 +87,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 "";
}
@@ -96,7 +96,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 "";
}
@@ -123,7 +123,7 @@ UnixListener::UnixListener(const char *path, int mode)
// - Create a socket
if ((fd = socket(AF_UNIX, SOCK_STREAM, 0)) < 0)
- throw socket_error("unable to create listening socket", errno);
+ throw socket_error("Unable to create listening socket", errno);
// - Delete existing socket (ignore result)
unlink(path);
@@ -138,14 +138,14 @@ UnixListener::UnixListener(const char *path, int mode)
umask(saved_umask);
if (result < 0) {
close(fd);
- throw socket_error("unable to bind listening socket", err);
+ throw socket_error("Unable to bind listening socket", err);
}
// - Set socket mode
if (chmod(path, mode) < 0) {
err = errno;
close(fd);
- throw socket_error("unable to set socket mode", err);
+ throw socket_error("Unable to set socket mode", err);
}
listen(fd);
diff --git a/common/rdr/RandomStream.cxx b/common/rdr/RandomStream.cxx
index 485259cf..3a524102 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::win32_error("unable to CryptGenRandom", GetLastError());
+ throw rdr::win32_error("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::posix_error("reading /dev/urandom or /dev/random "
+ throw rdr::posix_error("Reading /dev/urandom or /dev/random "
"failed", errno);
end += n;
} else {
diff --git a/common/rdr/ZlibOutStream.cxx b/common/rdr/ZlibOutStream.cxx
index 13788f8d..5079c723 100644
--- a/common/rdr/ZlibOutStream.cxx
+++ b/common/rdr/ZlibOutStream.cxx
@@ -96,7 +96,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
@@ -123,7 +123,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
@@ -137,7 +137,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
@@ -151,7 +151,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 c6feef9f..e8451337 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;
@@ -211,7 +211,7 @@ bool CConnection::processVersionMsg()
bool CConnection::processSecurityTypesMsg()
{
- vlog.debug("processing security types message");
+ vlog.debug("Processing security types message");
int secType = secTypeInvalid;
@@ -296,7 +296,7 @@ bool CConnection::processSecurityTypesMsg()
bool CConnection::processSecurityMsg()
{
- vlog.debug("processing security message");
+ vlog.debug("Processing security message");
if (!csecurity->processMsg())
return false;
@@ -307,7 +307,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) {
@@ -323,10 +323,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 protocol_error("Unknown security result from server");
@@ -343,7 +343,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;
@@ -365,7 +365,7 @@ bool CConnection::processSecurityReasonMsg()
bool CConnection::processInitMsg()
{
- vlog.debug("reading server initialisation");
+ vlog.debug("Reading server initialisation");
return reader_->readServerInit();
}
@@ -462,7 +462,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 9bad5036..a10f7c47 100644
--- a/common/rfb/CMsgReader.cxx
+++ b/common/rfb/CMsgReader.cxx
@@ -281,7 +281,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;
}
@@ -481,7 +481,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 3761ca30..9072ce50 100644
--- a/common/rfb/CSecurityTLS.cxx
+++ b/common/rfb/CSecurityTLS.cxx
@@ -316,7 +316,7 @@ void CSecurityTLS::checkSession()
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::tls_error("server certificate verification()", err);
}
diff --git a/common/rfb/Configuration.cxx b/common/rfb/Configuration.cxx
index 8f7cb6a7..44d42a88 100644
--- a/common/rfb/Configuration.cxx
+++ b/common/rfb/Configuration.cxx
@@ -237,7 +237,7 @@ bool VoidParameter::isBool() const {
void
VoidParameter::setImmutable() {
- vlog.debug("set immutable %s", getName());
+ vlog.debug("Set immutable %s", getName());
immutable = true;
}
@@ -271,7 +271,7 @@ bool AliasParameter::isBool() const {
void
AliasParameter::setImmutable() {
- vlog.debug("set immutable %s (Alias)", getName());
+ vlog.debug("Set immutable %s (Alias)", getName());
param->setImmutable();
}
@@ -309,7 +309,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 {
@@ -346,7 +346,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;
@@ -389,7 +389,7 @@ bool StringParameter::setParam(const char* v) {
if (immutable) return true;
if (!v)
throw std::invalid_argument("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;
}
@@ -440,7 +440,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/KeyRemapper.cxx b/common/rfb/KeyRemapper.cxx
index 328955d7..1c478178 100644
--- a/common/rfb/KeyRemapper.cxx
+++ b/common/rfb/KeyRemapper.cxx
@@ -60,12 +60,12 @@ void KeyRemapper::setMapping(const char* m) {
if (sscanf(m, "0x%x%c>0x%x", &from,
&bidi, &to) == 3) {
if (bidi != '-' && bidi != '<')
- vlog.error("warning: unknown operation %c>, assuming ->", bidi);
+ vlog.error("Warning: Unknown operation %c>, assuming ->", bidi);
mapping[from] = to;
if (bidi == '<')
mapping[to] = from;
} else {
- vlog.error("warning: bad mapping %.*s", (int)(nextComma-m), m);
+ vlog.error("Warning: Bad mapping %.*s", (int)(nextComma-m), m);
}
m = nextComma;
if (nextComma[0])
diff --git a/common/rfb/SConnection.cxx b/common/rfb/SConnection.cxx
index a31249fb..dc0c1e85 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;
@@ -195,7 +195,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;
@@ -230,7 +230,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;
@@ -274,7 +274,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 c4899aa9..22d88079 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/TightEncoder.cxx b/common/rfb/TightEncoder.cxx
index 169b74f7..3d46aaa3 100644
--- a/common/rfb/TightEncoder.cxx
+++ b/common/rfb/TightEncoder.cxx
@@ -43,7 +43,7 @@ struct TightConf {
// settings for each of 10 compression levels (0..9).
//
// NOTE: The parameters used in this encoder are the result of painstaking
-// research by The VirtualGL Project using RFB session captures from a variety
+// research by The VirtualGL project using RFB session captures from a variety
// of both 2D and 3D applications. See http://www.VirtualGL.org for the full
// reports.
diff --git a/common/rfb/TightJPEGEncoder.cxx b/common/rfb/TightJPEGEncoder.cxx
index de8fd77f..527dc618 100644
--- a/common/rfb/TightJPEGEncoder.cxx
+++ b/common/rfb/TightJPEGEncoder.cxx
@@ -37,7 +37,7 @@ struct TightJPEGConfiguration {
};
// NOTE: The JPEG quality and subsampling levels below were obtained
-// experimentally by the VirtualGL Project. They represent the approximate
+// experimentally by the VirtualGL project. They represent the approximate
// average compression ratios listed below, as measured across the set of
// every 10th frame in the SPECviewperf 9 benchmark suite.
//
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 f40bd79e..cb36872a 100644
--- a/common/rfb/VNCSConnectionST.cxx
+++ b/common/rfb/VNCSConnectionST.cxx
@@ -82,7 +82,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
@@ -122,7 +122,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/common/rfb/VNCServerST.cxx b/common/rfb/VNCServerST.cxx
index f175d31f..f4f48e1e 100644
--- a/common/rfb/VNCServerST.cxx
+++ b/common/rfb/VNCServerST.cxx
@@ -17,7 +17,7 @@
* USA.
*/
-// -=- Single-Threaded VNC Server implementation
+// -=- Single-Threaded VNC server implementation
// Note about how sockets get closed: