The reason for this is to keep a consistency through out the project.
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)";
}
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)";
}
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 "";
}
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;
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
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) */
(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);
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);
}
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);
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");
}
}
if (result == -1)
- throw SocketException("unable to connect to socket", err);
+ throw SocketException("Unable to connect to socket", err);
setFd(sock);
}
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 "";
}
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 "";
}
// - 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);
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);
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;
}
}
{
#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);
}
#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
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 {
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
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
}
#ifdef ZLIBOUT_DEBUG
- vlog.debug("after deflate: %d bytes",
+ vlog.debug("After deflate: %d bytes",
zs->next_out-underlying->getptr());
#endif
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
int majorVersion;
int minorVersion;
- vlog.debug("reading protocol version");
+ vlog.debug("Reading protocol version");
if (!is->hasData(12))
return false;
bool CConnection::processSecurityTypesMsg()
{
- vlog.debug("processing security types message");
+ vlog.debug("Processing security types message");
int secType = secTypeInvalid;
bool CConnection::processSecurityMsg()
{
- vlog.debug("processing security message");
+ vlog.debug("Processing security message");
if (!csecurity->processMsg())
return false;
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) {
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");
bool CConnection::processSecurityReasonMsg()
{
- vlog.debug("processing security reason message");
+ vlog.debug("Processing security reason message");
if (!is->hasData(4))
return false;
bool CConnection::processInitMsg()
{
- vlog.debug("reading server initialisation");
+ vlog.debug("Reading server initialisation");
return reader_->readServerInit();
}
CMsgHandler::serverInit(width, height, pf, name);
state_ = RFBSTATE_NORMAL;
- vlog.debug("initialisation done");
+ vlog.debug("Initialisation done");
initDone();
assert(framebuffer != nullptr);
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;
}
}
if (r.is_empty())
- vlog.error("zero size rect");
+ vlog.error("Zero size rect");
return handler->dataRect(r, encoding);
}
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);
}
void
VoidParameter::setImmutable() {
- vlog.debug("set immutable %s", getName());
+ vlog.debug("Set immutable %s", getName());
immutable = true;
}
void
AliasParameter::setImmutable() {
- vlog.debug("set immutable %s (Alias)", getName());
+ vlog.debug("Set immutable %s (Alias)", getName());
param->setImmutable();
}
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 {
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;
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;
}
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;
int majorVersion;
int minorVersion;
- vlog.debug("reading protocol version");
+ vlog.debug("Reading protocol version");
if (!is->hasData(12))
return false;
bool SConnection::processSecurityTypeMsg()
{
- vlog.debug("processing security type message");
+ vlog.debug("Processing security type message");
if (!is->hasData(1))
return false;
bool SConnection::processSecurityMsg()
{
- vlog.debug("processing security message");
+ vlog.debug("Processing security message");
try {
if (!ssecurity->processMsg())
return false;
bool SConnection::processInitMsg()
{
- vlog.debug("reading client initialisation");
+ vlog.debug("Reading client initialisation");
return reader_->readClientInit();
}
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);
return toWait;
}
// Time has jumped backwards!
- vlog.info("time has moved backwards!");
+ vlog.info("Time has moved backwards!");
pending.front()->dueTime = now;
toWait = 0;
}
{
// 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
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()) {
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;
public boolean isBool() { return param.isBool(); }
public void setImmutable() {
- vlog.debug("set immutable "+getName()+" (Alias)");
+ vlog.debug("Set immutable "+getName()+" (Alias)");
param.setImmutable();
}
int majorVersion;
int minorVersion;
- vlog.debug("reading protocol version");
+ vlog.debug("Reading protocol version");
if (!is.checkNoWait(12))
return;
private void processSecurityTypesMsg()
{
- vlog.debug("processing security types message");
+ vlog.debug("Processing security types message");
int secType = Security.secTypeInvalid;
}
private void processSecurityMsg() {
- vlog.debug("processing security message");
+ vlog.debug("Processing security message");
if (csecurity.processMsg(this)) {
state_ = stateEnum.RFBSTATE_SECURITY_RESULT;
processSecurityResultMsg();
}
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;
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");
}
private void processInitMsg() {
- vlog.debug("reading server initialisation");
+ vlog.debug("Reading server initialisation");
reader_.readServerInit();
}
super.serverInit(width, height, pf, name);
state_ = stateEnum.RFBSTATE_NORMAL;
- vlog.debug("initialisation done");
+ vlog.debug("Initialisation done");
initDone();
assert(framebuffer != null);
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();
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;
}
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);
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;
abstract public String getValueStr();
public boolean isBool() { return false; }
public void setImmutable() {
- vlog.debug("set immutable "+getName());
+ vlog.debug("Set immutable "+getName());
immutable = true;
}
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());
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
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;
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;
Visual* vis = DefaultVisual(dpy, DefaultScreen(dpy));
if (vis->c_class != TrueColor) {
- vlog.error("pseudocolour not supported");
+ vlog.error("Pseudocolour not supported");
exit(1);
}
}
if (visual->c_class != TrueColor) {
- vlog.error("pseudocolour not supported");
+ vlog.error("Pseudocolour not supported");
exit(1);
}
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);
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);
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");
}
&redMask, &greenMask, &blueMask);
if (!trueColour) {
- vlog.error("pseudocolour not supported");
+ vlog.error("Pseudocolour not supported");
abort();
}
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");
}
}
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);
{
// 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);
}
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_;
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;
}
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; i<itemCount; i++) {
try {
ImpersonateCurrentUser icu;
- vlog.debug("disable desktop wallpaper/Active Desktop");
+ vlog.debug("Disable desktop wallpaper/Active Desktop");
// -=- First attempt to remove the wallpaper using Active Desktop
try {
ImpersonateCurrentUser icu;
if (restoreActiveDesktop) {
- vlog.debug("restore Active Desktop");
+ vlog.debug("Restore Active Desktop");
// -=- First attempt to re-enable Active Desktop
try {
}
if (restoreWallpaper) {
- vlog.debug("restore desktop wallpaper");
+ vlog.debug("Restore desktop wallpaper");
// -=- Then restore the standard wallpaper if required
SysParamsInfo(SPI_SETDESKWALLPAPER, 0, nullptr, SPIF_SENDCHANGE);
try {
ImpersonateCurrentUser icu;
- vlog.debug("disable desktop effects");
+ vlog.debug("Disable desktop effects");
SysParamsInfo(SPI_SETFONTSMOOTHING, FALSE, nullptr, SPIF_SENDCHANGE);
if (SysParamsInfo(SPI_GETUIEFFECTS, 0, &uiEffects, 0) == ERROR_CALL_NOT_IMPLEMENTED) {
if (restoreEffects) {
ImpersonateCurrentUser icu;
- vlog.debug("restore desktop effects");
+ vlog.debug("Restore desktop effects");
RegKey desktopCfg;
desktopCfg.openKey(HKEY_CURRENT_USER, "Control Panel\\Desktop");
Clipboard::Clipboard()
: MsgWindow("Clipboard"), notifier(nullptr), next_window(nullptr) {
next_window = SetClipboardViewer(getHandle());
- vlog.debug("registered clipboard handler");
+ vlog.debug("Registered clipboard handler");
}
Clipboard::~Clipboard() {
- vlog.debug("removing %p from chain (next is %p)", getHandle(), next_window);
+ vlog.debug("Removing %p from chain (next is %p)", getHandle(), next_window);
ChangeClipboardChain(getHandle(), next_window);
}
switch (msg) {
case WM_CHANGECBCHAIN:
- vlog.debug("change clipboard chain (%I64x, %I64x)",
+ vlog.debug("Change clipboard chain (%I64x, %I64x)",
(long long)wParam, (long long)lParam);
if ((HWND) wParam == next_window)
next_window = (HWND) lParam;
else if (next_window != nullptr)
SendMessage(next_window, msg, wParam, lParam);
else
- vlog.error("bad clipboard chain change!");
+ vlog.error("Bad clipboard chain change!");
break;
case WM_DRAWCLIPBOARD:
{
HWND owner = GetClipboardOwner();
if (owner == getHandle()) {
- vlog.debug("local clipboard changed by me");
+ vlog.debug("Local clipboard changed by me");
} else {
- vlog.debug("local clipboard changed by %p", owner);
+ vlog.debug("Local clipboard changed by %p", owner);
if (notifier == nullptr)
- vlog.debug("no clipboard notifier registered");
+ vlog.debug("No clipboard notifier registered");
else
notifier->notifyClipboardChanged(IsClipboardFormatAvailable(CF_UNICODETEXT));
}
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);
}
}
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)
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;
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;
}
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) {
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);
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;
}
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
}
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++;
}
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);
}
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;
//
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
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)
}
void RegConfig::processEvent(HANDLE /*event*/) {
- vlog.info("registry changed");
+ vlog.info("Registry changed");
// Reinstate the registry change notifications
ResetEvent(event);
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;
}
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;
}
void SDisplay::start()
{
- vlog.debug("starting");
+ vlog.debug("Starting");
// Try to make session zero the console session
if (!inConsoleSession())
// 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();
}
server->setPixelBuffer(nullptr);
stopCore();
- vlog.debug("stopped");
+ vlog.debug("Stopped");
if (statusLocation) *statusLocation = false;
}
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.
void
SDisplay::notifyClipboardChanged(bool available) {
- vlog.debug("clipboard text changed");
+ vlog.debug("Clipboard text changed");
if (server)
server->announceClipboard(available);
}
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");
}
}
// - If the SDisplay isn't even started then quit now
if (!core) {
- vlog.error("not start()ed");
+ vlog.error("Not start()ed");
return;
}
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
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);
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));
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);
// 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];
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) &&
// -=- 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);
}
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
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() {
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;
}
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;
}
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;
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;
}
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;
}
// - 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,
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};
// - 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;
// - 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);
// - 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);
// - 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;
}
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;
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];
// 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)
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;
return;
if (!hooks.empty())
return;
- vlog.debug("closing thread");
+ vlog.debug("Closing thread");
hook_mgr->stop();
delete hook_mgr;
hook_mgr = nullptr;
static bool AddHook(WMHooks* hook) {
- vlog.debug("adding hook");
+ vlog.debug("Adding hook");
os::AutoMutex a(&hook_mgr_lock);
if (!StartHookThread())
return false;
static bool RemHook(WMHooks* hook) {
{
- vlog.debug("removing hook");
+ vlog.debug("Removing hook");
os::AutoMutex a(&hook_mgr_lock);
hooks.remove(hook);
}
Region updates[2];
int activeRgn = 0;
- vlog.debug("starting hook thread");
+ vlog.debug("Starting hook thread");
thread_id = GetCurrentThreadId();
}
}
- 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();
}
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);
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
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
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());
}
}
}
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);
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();
}
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) {
break;
default:
- vlog.error("unknown command %d queued", command);
+ vlog.error("Unknown command %d queued", command);
};
// Clear the command and signal completion
} 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) ||