]> git.webhop.me Git - lcd4linux.git/commitdiff
drv_vnc: run as http daemon
authormichux <michux@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>
Tue, 31 Mar 2009 06:35:35 +0000 (06:35 +0000)
committermichux <michux@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>
Tue, 31 Mar 2009 06:35:35 +0000 (06:35 +0000)
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@1019 3ae390bd-cb1e-0410-b409-cd5a39f66f1f

drv_vnc.c

index d0a8e2f7fbe406f325d5449d51c028407303ea3c..f86af0f8ee100d8b16f5d80c5a322e9500fec61b 100644 (file)
--- 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();