Package: directvnc Version: 0.7.7-1 Severity: important Tags: patch Dear Maintainer,
upstream got a little bit lost in boolean algebra: main.c: ---8<-- ... if (!modmap_read_file(opt.modmapfile)) { printf("Couldn't parse the keyboard mapping file %s. Exiting\n",opt.modmapfile); exit(0); } ... ---8<-- modmap.c: ---8<--- ... int modmap_read_file(filename) char *filename; { ... if(filename != NULL) return process_file(filename); return 0; } static int process_file (filename) char *filename; /* NULL means use stdin */ { ... if (!filename) { return 1; /* use the hardcoded map */ } else { fp = fopen (filename, "r"); if (!fp) { fprintf (stderr, "unable to open modmap file '%s' for reading\n", filename); return -1; } } ... return 0; } ... ---8<--- Short: No or a valid keymap let modmap_read_file() return zero which causes directvnc to fail. Only a given invalid keymap file makes directvnc happy. The attached patch may help: ---8<--- --- a/src/main.c +++ b/src/main.c @@ -37,7 +37,7 @@ main (int argc,char **argv) /* Read the modifier map if provided */ - if (!modmap_read_file(opt.modmapfile)) { + if (modmap_read_file(opt.modmapfile)) { printf("Couldn't parse the keyboard mapping file %s. Exiting\n",opt.modma exit(0); } --- a/src/modmap.c +++ b/src/modmap.c @@ -110,9 +110,8 @@ int modmap_read_file(filename) for (i = 0; i < 256; i ++) { bzero (&kbmap[i],sizeof(MAPENTRY)); } - if(filename != NULL) return process_file(filename); - return 0; + return process_file(filename); } static int process_file (filename) @@ -125,7 +124,7 @@ static int process_file (filename) /* open the file, eventually we'll want to pipe through cpp */ if (!filename) { - return 1; /* use the hardcoded map */ + return 0; /* use the hardcoded map */ } else { fp = fopen (filename, "r"); if (!fp) { ---8<--- Regards Bene -- System Information: Debian Release: wheezy/sid APT prefers unstable APT policy: (500, 'unstable'), (500, 'oldstable') Architecture: amd64 (x86_64) Kernel: Linux 3.2.0-2-amd64 (SMP w/4 CPU cores) Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages directvnc depends on: ii libc6 2.13-33 ii libdirectfb-1.2-9 1.2.10.0-5 ii libjpeg8 8d-1 ii zlib1g 1:1.2.7.dfsg-11 Versions of packages directvnc recommends: ii x11proto-core-dev 7.0.23-1 directvnc suggests no packages. -- no debconf information -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org