From 27bba2d8c0a77657c10428a83f46a2d8303487ff Mon Sep 17 00:00:00 2001 From: michux Date: Tue, 31 Mar 2009 06:35:35 +0000 Subject: drv_vnc: run as http daemon git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@1019 3ae390bd-cb1e-0410-b409-cd5a39f66f1f --- drv_vnc.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'drv_vnc.c') diff --git a/drv_vnc.c b/drv_vnc.c index d0a8e2f..f86af0f 100644 --- a/drv_vnc.c +++ b/drv_vnc.c @@ -94,6 +94,7 @@ static int mouse_stat_old = 0; static int process_event = 0; static long frames = 0; static char *password; +static char *javaClassFiles; static struct timeval startDriver; static int maxfps = -1; @@ -292,7 +293,10 @@ static int drv_vnc_open(const char *Section) if (password != NULL) { info("[DRV_VNC] password enabled"); } - + javaClassFiles = cfg_get(Section, "HttpDir", NULL); + if (javaClassFiles != NULL) { + info("[DRV_VNC] HTTP server enabled"); + } return 0; } @@ -416,7 +420,10 @@ static int drv_vnc_start(const char *section) server->authPasswdData = (void *) passwds; server->passwordCheck = rfbCheckPasswordByList; } - + if (javaClassFiles != NULL) { + server->httpDir = javaClassFiles; + server->httpEnableProxyConnect = TRUE; + } /* Initialize the server */ rfbInitServer(server); @@ -506,6 +513,9 @@ int drv_vnc_quit(const int quiet) if (password != NULL) { free(password); } + if (javaClassFiles != NULL) { + free(javaClassFiles); + } debug("closing connection"); drv_vnc_close(); -- cgit v1.2.3