summaryrefslogtreecommitdiffstats
path: root/x11vnc/user.c
diff options
context:
space:
mode:
authorrunge <runge>2007-02-12 23:44:39 +0000
committerrunge <runge>2007-02-12 23:44:39 +0000
commit241f3ed566d34bf5b6c67ebebcc00727134d93b2 (patch)
treee42ddc70dc6a50503a2e22aef238c7a1fde7fb43 /x11vnc/user.c
parent0016cd4280ee9a0d088454a508a9c7f6bde33f62 (diff)
downloadlibtdevnc-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.c22
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);
}