diff options
author | Pierre Ossman <ossman@cendio.se> | 2023-01-13 11:14:21 +0100 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2023-02-04 14:03:13 +0100 |
commit | 5c1ac16776cd9f2a75e31086755e72186b3b3d41 (patch) | |
tree | 234a54c7f11c25ba59f8487118d13eb550c1cc64 /unix/x0vncserver/XDesktop.cxx | |
parent | 1af2a56f7583b301890f8ea213f262782cc3c9f1 (diff) | |
download | tigervnc-5c1ac16776cd9f2a75e31086755e72186b3b3d41.tar.gz tigervnc-5c1ac16776cd9f2a75e31086755e72186b3b3d41.zip |
Return static char buffer from some methods
This mimics how some system functions (like inet_ntop()) work, and
avoids complexity around ownership of the returned string buffer.
The downside is that the string must be consumed directly as it will be
overwritten on the next call, but that is not an issue with the current
usage.
Diffstat (limited to 'unix/x0vncserver/XDesktop.cxx')
-rw-r--r-- | unix/x0vncserver/XDesktop.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/unix/x0vncserver/XDesktop.cxx b/unix/x0vncserver/XDesktop.cxx index 0b6d7ef1..12169c76 100644 --- a/unix/x0vncserver/XDesktop.cxx +++ b/unix/x0vncserver/XDesktop.cxx @@ -327,9 +327,9 @@ void XDesktop::queryConnection(network::Socket* sock, queryConnectSock = sock; - CharArray address(sock->getPeerAddress()); delete queryConnectDialog; - queryConnectDialog = new QueryConnectDialog(dpy, address.buf, + queryConnectDialog = new QueryConnectDialog(dpy, + sock->getPeerAddress(), userName, queryConnectTimeout, this); |