Subversion Repositories

?revision_form?Rev ?revision_input??revision_submit??revision_endform?

Blame | Last modification | View Log | RSS feed

#! /bin/sh /usr/share/dpatch/dpatch-run
## utraftp_path.dpatch by Magnus Holmgren <holmgren@debian.org>
##
## DP: Use hardcoded (and correct for the Debian package) path to
## DP: ultraftp.jar if SSVNC_ULTRA_FTP_JAR is unset.

@DPATCH@
diff -urNad trunk~/vnc_unixsrc/vncviewer/argsresources.c trunk/vnc_unixsrc/vncviewer/argsresources.c
--- trunk~/vnc_unixsrc/vncviewer/argsresources.c        2009-10-27 04:26:12.000000000 +0100
+++ trunk/vnc_unixsrc/vncviewer/argsresources.c 2009-10-31 15:22:46.000000000 +0100
@@ -1624,35 +1624,8 @@
                appData.useBGR233 = 0;
        }
 
-       if (getenv("SSVNC_ULTRA_FTP_JAR") == NULL && programName != NULL) {
-               int len = strlen(programName) + 200;
-               char *q, *jar = (char *) malloc(len);
-               
-               sprintf(jar, "%s", programName);
-               q = strrchr(jar, '/');
-               if (q) {
-                       struct stat sb;
-                       *(q+1) = '\0';
-                       strcat(jar, "../lib/ssvnc/util/ultraftp.jar");
-                       if (stat(jar, &sb) == 0) {
-                               char *put = (char *) malloc(len);
-                               sprintf(put, "SSVNC_ULTRA_FTP_JAR=%s", jar);
-                               fprintf(stderr, "Setting: %s\n\n", put);
-                               putenv(put);
-                       } else {
-                               sprintf(jar, "%s", programName);
-                               q = strrchr(jar, '/');
-                               *(q+1) = '\0';
-                               strcat(jar, "util/ultraftp.jar");
-                               if (stat(jar, &sb) == 0) {
-                                       char *put = (char *) malloc(len);
-                                       sprintf(put, "SSVNC_ULTRA_FTP_JAR=%s", jar);
-                                       fprintf(stderr, "Setting: %s\n\n", put);
-                                       putenv(put);
-                               }
-                       }
-               }
-               free(jar);
+       if (getenv("SSVNC_ULTRA_FTP_JAR") == NULL) {
+           putenv("SSVNC_ULTRA_FTP_JAR=/usr/lib/ssvnc/util/ultraftp.jar");
        }