aboutsummaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
Diffstat (limited to 'win')
-rw-r--r--win/rfb_win32/SDisplay.cxx16
-rw-r--r--win/vncconfig/Connections.h3
-rw-r--r--win/vncconfig/Desktop.h12
-rw-r--r--win/winvnc/VNCServerWin32.cxx3
4 files changed, 15 insertions, 19 deletions
diff --git a/win/rfb_win32/SDisplay.cxx b/win/rfb_win32/SDisplay.cxx
index 02ef548d..110edcb0 100644
--- a/win/rfb_win32/SDisplay.cxx
+++ b/win/rfb_win32/SDisplay.cxx
@@ -120,13 +120,12 @@ void SDisplay::stop()
// If we successfully start()ed then perform the DisconnectAction
if (core) {
CurrentUserToken cut;
- CharArray action(disconnectAction.getData());
- if (stricmp(action.buf, "Logoff") == 0) {
+ if (stricmp(disconnectAction, "Logoff") == 0) {
if (!cut.h)
vlog.info("ignoring DisconnectAction=Logoff - no current user");
else
ExitWindowsEx(EWX_LOGOFF, 0);
- } else if (stricmp(action.buf, "Lock") == 0) {
+ } else if (stricmp(disconnectAction, "Lock") == 0) {
if (!cut.h) {
vlog.info("ignoring DisconnectAction=Lock - no current user");
} else {
@@ -448,10 +447,9 @@ SDisplay::recreatePixelBuffer(bool force) {
// Opening the whole display with CreateDC doesn't work on multi-monitor
// systems for some reason.
DeviceContext* new_device = 0;
- CharArray deviceName(displayDevice.getData());
- if (deviceName.buf[0]) {
- vlog.info("Attaching to device %s", deviceName.buf);
- new_device = new DeviceDC(deviceName.buf);
+ if (strlen(displayDevice) > 0) {
+ vlog.info("Attaching to device %s", (const char*)displayDevice);
+ new_device = new DeviceDC(displayDevice);
}
if (!new_device) {
vlog.info("Attaching to virtual desktop");
@@ -460,8 +458,8 @@ SDisplay::recreatePixelBuffer(bool force) {
// Get the coordinates of the specified dispay device
Rect newScreenRect;
- if (deviceName.buf[0]) {
- MonitorInfo info(deviceName.buf);
+ if (strlen(displayDevice) > 0) {
+ MonitorInfo info(displayDevice);
newScreenRect = Rect(info.rcMonitor.left, info.rcMonitor.top,
info.rcMonitor.right, info.rcMonitor.bottom);
} else {
diff --git a/win/vncconfig/Connections.h b/win/vncconfig/Connections.h
index ff03897a..d3e4dace 100644
--- a/win/vncconfig/Connections.h
+++ b/win/vncconfig/Connections.h
@@ -234,8 +234,7 @@ namespace rfb {
bool isChanged() {
try {
CharArray new_hosts(getHosts());
- CharArray old_hosts(hosts.getData());
- return (strcmp(new_hosts.buf, old_hosts.buf) != 0) ||
+ return (strcmp(new_hosts.buf, hosts) != 0) ||
(localHost != isItemChecked(IDC_LOCALHOST)) ||
(port_number != getItemInt(IDC_PORT)) ||
(rfb::Server::idleTimeout != getItemInt(IDC_IDLE_TIMEOUT));
diff --git a/win/vncconfig/Desktop.h b/win/vncconfig/Desktop.h
index 65d99946..d7ed0bc8 100644
--- a/win/vncconfig/Desktop.h
+++ b/win/vncconfig/Desktop.h
@@ -31,9 +31,9 @@ namespace rfb {
DesktopPage(const RegKey& rk)
: PropSheetPage(GetModuleHandle(0), MAKEINTRESOURCE(IDD_DESKTOP)), regKey(rk) {}
void initDialog() {
- CharArray action(rfb::win32::SDisplay::disconnectAction.getData());
- bool disconnectLock = stricmp(action.buf, "Lock") == 0;
- bool disconnectLogoff = stricmp(action.buf, "Logoff") == 0;
+ const char *action(rfb::win32::SDisplay::disconnectAction);
+ bool disconnectLock = stricmp(action, "Lock") == 0;
+ bool disconnectLogoff = stricmp(action, "Logoff") == 0;
setItemChecked(IDC_DISCONNECT_LOGOFF, disconnectLogoff);
setItemChecked(IDC_DISCONNECT_LOCK, disconnectLock);
setItemChecked(IDC_DISCONNECT_NONE, !disconnectLock && !disconnectLogoff);
@@ -47,9 +47,9 @@ namespace rfb {
case IDC_DISCONNECT_NONE:
case IDC_REMOVE_WALLPAPER:
case IDC_DISABLE_EFFECTS:
- CharArray action(rfb::win32::SDisplay::disconnectAction.getData());
- bool disconnectLock = stricmp(action.buf, "Lock") == 0;
- bool disconnectLogoff = stricmp(action.buf, "Logoff") == 0;
+ const char *action(rfb::win32::SDisplay::disconnectAction);
+ bool disconnectLock = stricmp(action, "Lock") == 0;
+ bool disconnectLogoff = stricmp(action, "Logoff") == 0;
setChanged((disconnectLogoff != isItemChecked(IDC_DISCONNECT_LOGOFF)) ||
(disconnectLock != isItemChecked(IDC_DISCONNECT_LOCK)) ||
(isItemChecked(IDC_REMOVE_WALLPAPER) != rfb::win32::SDisplay::removeWallpaper) ||
diff --git a/win/winvnc/VNCServerWin32.cxx b/win/winvnc/VNCServerWin32.cxx
index 70f82ff0..55efabe1 100644
--- a/win/winvnc/VNCServerWin32.cxx
+++ b/win/winvnc/VNCServerWin32.cxx
@@ -151,8 +151,7 @@ void VNCServerWin32::regConfigChanged() {
rfbSock.setPort(port_number, localHost);
// -=- Update the TCP address filter for both ports, if open.
- CharArray pattern(hosts.getData());
- rfbSock.setFilter(pattern.buf);
+ rfbSock.setFilter(hosts);
// -=- Update the tray icon tooltip text with IP addresses
processAddressChange();