summaryrefslogtreecommitdiff
path: root/vnc.c
diff options
context:
space:
mode:
Diffstat (limited to 'vnc.c')
-rw-r--r--vnc.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/vnc.c b/vnc.c
index ad3c1ce151..3f5d622ab4 100644
--- a/vnc.c
+++ b/vnc.c
@@ -86,7 +86,6 @@ char *vnc_socket_local_addr(const char *format, int fd) {
return addr_to_string(format, &sa, salen);
}
-
char *vnc_socket_remote_addr(const char *format, int fd) {
struct sockaddr_storage sa;
socklen_t salen;
@@ -2101,6 +2100,13 @@ int vnc_display_password(DisplayState *ds, const char *password)
return 0;
}
+char *vnc_display_local_addr(DisplayState *ds)
+{
+ VncDisplay *vs = ds ? (VncDisplay *)ds->opaque : vnc_display;
+
+ return vnc_socket_local_addr("%s:%s", vs->lsock);
+}
+
int vnc_display_open(DisplayState *ds, const char *display)
{
VncDisplay *vs = ds ? (VncDisplay *)ds->opaque : vnc_display;