diff options
author | runge <runge> | 2007-02-12 23:44:39 +0000 |
---|---|---|
committer | runge <runge> | 2007-02-12 23:44:39 +0000 |
commit | 241f3ed566d34bf5b6c67ebebcc00727134d93b2 (patch) | |
tree | e42ddc70dc6a50503a2e22aef238c7a1fde7fb43 /x11vnc/user.c | |
parent | 0016cd4280ee9a0d088454a508a9c7f6bde33f62 (diff) | |
download | libtdevnc-241f3ed566d34bf5b6c67ebebcc00727134d93b2.tar.gz libtdevnc-241f3ed566d34bf5b6c67ebebcc00727134d93b2.zip |
x11vnc: add avahi (aka mDNS/Zeroconf/Bonjour...) support thanks to Diego Petteno. add -find -create
Diffstat (limited to 'x11vnc/user.c')
-rw-r--r-- | x11vnc/user.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/x11vnc/user.c b/x11vnc/user.c index 7124092..0322f85 100644 --- a/x11vnc/user.c +++ b/x11vnc/user.c @@ -1382,6 +1382,28 @@ int wait_for_client(int *argc, char** argv, int http) { keep_unixpw = 1; } + if (!inetd) { + if (!use_openssl) { + announce(screen->port, use_openssl, NULL); + fprintf(stdout, "PORT=%d\n", screen->port); + } else { + fprintf(stdout, "PORT=%d\n", screen->port); + if (stunnel_port) { + fprintf(stdout, "SSLPORT=%d\n", stunnel_port); + } else if (use_openssl) { + fprintf(stdout, "SSLPORT=%d\n", screen->port); + } + } + fflush(stdout); + } else if (!use_openssl && avahi) { + char *name = rfb_desktop_name; + if (!name) { + name = use_dpy; + } + avahi_initialise(); + avahi_advertise(name, this_host(), screen->port); + } + if (inetd && use_openssl) { accept_openssl(OPENSSL_INETD); } |