CharArray dpyStr(displayname.getData());
if (!(dpy = XOpenDisplay(dpyStr.buf[0] ? dpyStr.buf : 0))) {
+ // FIXME: Why not vlog.error(...)?
fprintf(stderr,"%s: unable to open display \"%s\"\r\n",
- programName, XDisplayName(displayname.getData()));
+ programName, XDisplayName(dpyStr.buf));
exit(1);
}
TcpListener listener((int)rfbport);
vlog.info("Listening on port %d", (int)rfbport);
- FileTcpFilter fileTcpFilter(hostsFile.getData());
- if (strlen(hostsFile.getData()) != 0)
+ const char *hostsData = hostsFile.getData();
+ FileTcpFilter fileTcpFilter(hostsData);
+ if (strlen(hostsData) != 0)
listener.setFilter(&fileTcpFilter);
+ delete[] hostsData;
PollingScheduler sched((int)pollingCycle, (int)maxProcessorUsage);