git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4905 3789f03b-4d11-0410-bbf8-ca57d06f2519tags/v1.2.90
@@ -100,7 +100,7 @@ void CConnection::processVersionMsg() | |||
char msg[256]; | |||
sprintf(msg,"Server gave unsupported RFB protocol version %d.%d", | |||
cp.majorVersion, cp.minorVersion); | |||
vlog.error(msg); | |||
vlog.error("%s", msg); | |||
state_ = RFBSTATE_INVALID; | |||
throw Exception(msg); | |||
} else if (useProtocol3_3 || cp.beforeVersion(3,7)) { |
@@ -72,7 +72,7 @@ static LogWriter vlog_raw("RawTLS"); | |||
static void debug_log(int level, const char* str) | |||
{ | |||
vlog_raw.debug(str); | |||
vlog_raw.debug("[%d]: %s", level, str); | |||
} | |||
void CSecurityTLS::initGlobal() |
@@ -239,7 +239,7 @@ void SConnection::processInitMsg() | |||
void SConnection::throwConnFailedException(const char* msg) | |||
{ | |||
vlog.info(msg); | |||
vlog.info("%s", msg); | |||
if (state_ == RFBSTATE_PROTOCOL_VERSION) { | |||
if (cp.majorVersion == 3 && cp.minorVersion == 3) { | |||
os->writeU32(0); |
@@ -49,7 +49,7 @@ static LogWriter vlog_raw("RawTLS"); | |||
static void debug_log(int level, const char* str) | |||
{ | |||
vlog.debug(str); | |||
vlog.debug("[%d]: %s", level, str); | |||
} | |||
void SSecurityTLS::initGlobal() |
@@ -431,7 +431,7 @@ int main(int argc, char** argv) | |||
XCloseDisplay(dpy); | |||
} catch (rdr::Exception &e) { | |||
vlog.error(e.str()); | |||
vlog.error("%s", e.str()); | |||
} | |||
return 0; |
@@ -546,7 +546,7 @@ int main(int argc, char** argv) | |||
} | |||
} catch (rdr::Exception &e) { | |||
vlog.error(e.str()); | |||
vlog.error("%s", e.str()); | |||
return 1; | |||
} | |||
@@ -99,7 +99,7 @@ CConn::CConn(const char* vncServerName) | |||
sock = new network::TcpSocket(serverHost, serverPort); | |||
vlog.info(_("connected to host %s port %d"), serverHost, serverPort); | |||
} catch (rdr::Exception& e) { | |||
vlog.error(e.str()); | |||
vlog.error("%s", e.str()); | |||
fl_alert("%s", e.str()); | |||
exit_vncviewer(); | |||
return; | |||
@@ -210,10 +210,10 @@ void CConn::socketEvent(int fd, void *data) | |||
cc->processMsg(); | |||
} while (cc->sock->inStream().checkNoWait(1)); | |||
} catch (rdr::EndOfStream& e) { | |||
vlog.info(e.str()); | |||
vlog.info("%s", e.str()); | |||
exit_vncviewer(); | |||
} catch (rdr::Exception& e) { | |||
vlog.error(e.str()); | |||
vlog.error("%s", e.str()); | |||
exit_vncviewer(e.str()); | |||
} | |||
@@ -369,7 +369,7 @@ int Viewport::handle(int event) | |||
try { | |||
cc->writer()->clientCutText(buffer, ret); | |||
} catch (rdr::Exception& e) { | |||
vlog.error(e.str()); | |||
vlog.error("%s", e.str()); | |||
exit_vncviewer(e.str()); | |||
} | |||
@@ -501,7 +501,7 @@ void Viewport::handlePointerEvent(const rfb::Point& pos, int buttonMask) | |||
try { | |||
cc->writer()->pointerEvent(pos, buttonMask); | |||
} catch (rdr::Exception& e) { | |||
vlog.error(e.str()); | |||
vlog.error("%s", e.str()); | |||
exit_vncviewer(e.str()); | |||
} | |||
} else { | |||
@@ -524,7 +524,7 @@ void Viewport::handlePointerTimeout(void *data) | |||
try { | |||
self->cc->writer()->pointerEvent(self->lastPointerPos, self->lastButtonMask); | |||
} catch (rdr::Exception& e) { | |||
vlog.error(e.str()); | |||
vlog.error("%s", e.str()); | |||
exit_vncviewer(e.str()); | |||
} | |||
} | |||
@@ -756,7 +756,7 @@ void Viewport::handleKeyEvent(int keyCode, int origKeyCode, const char *keyText, | |||
try { | |||
cc->writer()->keyEvent(iter->second, false); | |||
} catch (rdr::Exception& e) { | |||
vlog.error(e.str()); | |||
vlog.error("%s", e.str()); | |||
exit_vncviewer(e.str()); | |||
} | |||
@@ -800,7 +800,7 @@ void Viewport::handleKeyEvent(int keyCode, int origKeyCode, const char *keyText, | |||
if (downKeySym.find(FL_Alt_R) != downKeySym.end()) | |||
cc->writer()->keyEvent(XK_Alt_R, false); | |||
} catch (rdr::Exception& e) { | |||
vlog.error(e.str()); | |||
vlog.error("%s", e.str()); | |||
exit_vncviewer(e.str()); | |||
} | |||
} | |||
@@ -814,7 +814,7 @@ void Viewport::handleKeyEvent(int keyCode, int origKeyCode, const char *keyText, | |||
try { | |||
cc->writer()->keyEvent(keySym, down); | |||
} catch (rdr::Exception& e) { | |||
vlog.error(e.str()); | |||
vlog.error("%s", e.str()); | |||
exit_vncviewer(e.str()); | |||
} | |||
@@ -178,7 +178,7 @@ void CleanDesktop::disableWallpaper() { | |||
if (ad.enable(false)) | |||
restoreActiveDesktop = true; | |||
} catch (rdr::Exception& e) { | |||
vlog.error(e.str()); | |||
vlog.error("%s", e.str()); | |||
} | |||
// -=- Switch of normal wallpaper and notify apps | |||
@@ -186,7 +186,7 @@ void CleanDesktop::disableWallpaper() { | |||
restoreWallpaper = true; | |||
} catch (rdr::Exception& e) { | |||
vlog.info(e.str()); | |||
vlog.info("%s", e.str()); | |||
} | |||
} | |||
@@ -203,7 +203,7 @@ void CleanDesktop::enableWallpaper() { | |||
ad.enable(true); | |||
restoreActiveDesktop = false; | |||
} catch (rdr::Exception& e) { | |||
vlog.error(e.str()); | |||
vlog.error("%s", e.str()); | |||
} | |||
} | |||
@@ -216,7 +216,7 @@ void CleanDesktop::enableWallpaper() { | |||
} | |||
} catch (rdr::Exception& e) { | |||
vlog.info(e.str()); | |||
vlog.info("%s", e.str()); | |||
} | |||
} | |||
@@ -230,7 +230,7 @@ void CleanDesktop::disablePattern() { | |||
restorePattern = true; | |||
} catch (rdr::Exception& e) { | |||
vlog.info(e.str()); | |||
vlog.info("%s", e.str()); | |||
} | |||
} | |||
@@ -252,7 +252,7 @@ void CleanDesktop::enablePattern() { | |||
} | |||
} catch (rdr::Exception& e) { | |||
vlog.info(e.str()); | |||
vlog.info("%s", e.str()); | |||
} | |||
} | |||
@@ -288,7 +288,7 @@ void CleanDesktop::disableEffects() { | |||
restoreEffects = true; | |||
} catch (rdr::Exception& e) { | |||
vlog.info(e.str()); | |||
vlog.info("%s", e.str()); | |||
} | |||
} | |||
@@ -317,6 +317,6 @@ void CleanDesktop::enableEffects() { | |||
} | |||
} catch (rdr::Exception& e) { | |||
vlog.info(e.str()); | |||
vlog.info("%s", e.str()); | |||
} | |||
} |
@@ -185,7 +185,7 @@ Clipboard::setClipText(const char* text) { | |||
vlog.debug("set clipboard"); | |||
} catch (rdr::Exception& e) { | |||
vlog.debug(e.str()); | |||
vlog.debug("%s", e.str()); | |||
} | |||
// - Close the clipboard |
@@ -276,7 +276,7 @@ void DeviceFrameBuffer::setCursor(HCURSOR hCursor, VNCServer* server) | |||
server->setCursor(cursor.width(), cursor.height(), cursor.hotspot, | |||
cursorBm.data, cursor.mask.buf); | |||
} catch (rdr::Exception& e) { | |||
vlog.error(e.str()); | |||
vlog.error("%s", e.str()); | |||
} | |||
} | |||
@@ -80,7 +80,7 @@ MonitorInfo::MonitorInfo(HWND window) { | |||
return; | |||
} | |||
} catch (rdr::Exception& e) { | |||
vlog.error(e.str()); | |||
vlog.error("%s", e.str()); | |||
} | |||
#endif | |||
@@ -106,7 +106,7 @@ MonitorInfo::MonitorInfo(const RECT& r) { | |||
return; | |||
} | |||
} catch (rdr::Exception& e) { | |||
vlog.error(e.str()); | |||
vlog.error("%s", e.str()); | |||
} | |||
#endif | |||
@@ -48,7 +48,7 @@ bool RegConfig::setKey(const HKEY rootkey, const TCHAR* keyname) { | |||
processEvent(event); | |||
return true; | |||
} catch (rdr::Exception& e) { | |||
vlog.debug(e.str()); | |||
vlog.debug("%s", e.str()); | |||
return false; | |||
} | |||
} | |||
@@ -65,7 +65,7 @@ void RegConfig::loadRegistryConfig(RegKey& key) { | |||
} | |||
} catch (rdr::SystemException& e) { | |||
if (e.err != 6) | |||
vlog.error(e.str()); | |||
vlog.error("%s", e.str()); | |||
} | |||
} | |||
@@ -185,7 +185,7 @@ void SDisplay::startCore() { | |||
if (tryMethod == 0) | |||
throw rdr::Exception("unable to access desktop"); | |||
tryMethod--; | |||
vlog.error(e.str()); | |||
vlog.error("%s", e.str()); | |||
} | |||
} | |||
vlog.info("Started %s", core->methodName()); | |||
@@ -388,7 +388,7 @@ SDisplay::processEvent(HANDLE event) { | |||
try { | |||
core->flushUpdates(); | |||
} catch (rdr::Exception& e) { | |||
vlog.error(e.str()); | |||
vlog.error("%s", e.str()); | |||
restartCore(); | |||
return; | |||
} |
@@ -43,7 +43,7 @@ static void requestAddressChangeEvents(network::SocketListener* sock_) { | |||
if (WSAIoctl(sock_->getFd(), SIO_ADDRESS_LIST_CHANGE, 0, 0, 0, 0, &dummy, 0, 0) == SOCKET_ERROR) { | |||
DWORD err = WSAGetLastError(); | |||
if (err != WSAEWOULDBLOCK) | |||
vlog.error("Unable to track address changes", err); | |||
vlog.error("Unable to track address changes: 0x%08x", (unsigned)err); | |||
} | |||
} | |||
@@ -70,7 +70,7 @@ void SocketManager::addListener(network::SocketListener* sock_, | |||
if (event) | |||
WSACloseEvent(event); | |||
delete sock_; | |||
vlog.error(e.str()); | |||
vlog.error("%s", e.str()); | |||
throw; | |||
} | |||
@@ -204,7 +204,7 @@ void SocketManager::processEvent(HANDLE event) { | |||
if (WSAEventSelect(ci.sock->getFd(), event, FD_READ | FD_CLOSE) == SOCKET_ERROR) | |||
throw rdr::SystemException("unable to re-enable WSAEventSelect:%u", WSAGetLastError()); | |||
} catch (rdr::Exception& e) { | |||
vlog.error(e.str()); | |||
vlog.error("%s", e.str()); | |||
remSocket(ci.sock); | |||
} | |||
} |