[Xastir] RAC lookup still broken

Jerry Stueve k4int1 at gmail.com
Mon Nov 8 13:29:29 EST 2010


On Mon, Nov 8, 2010 at 10:45 AM, Lee Bengston <lee.bengston at gmail.com>wrote:

> On Sun, Nov 7, 2010 at 9:24 PM, Bill Hammond <ka1ssr at earthlink.net> wrote:
> > Hi!
> >
> > I tried to do an RAC lookup and was greeted by a rather rude trace dump.
>  I
> > recall this was a problem pre-2.0.2 and was wondering if this was
> addressed
> > at one point.
> >
> > I'm running ubuntu 10.10 with a clean build.  I understand the mailer
> > doesn't like attachments, so feel free to e-mail me for the dump.
>
> When this was first reported back in July, I found that the RAC lookup
> was only broken in Ubuntu 10.04.  RAC lookups in the same (1.99) build
> of Xastir worked fine in Mepis 8.5, Sidux 2010, and PCLinuxOS 2010.
> I'm not sure what is causing it, but it is evidently very
> Ubuntu-specific.
>
> It actually appears to be a compiler issue. If you remove the cast (char *)
from the call to fgets as in the patch below,all is well. This changes one
warning for another at compile time but the RAC lookup work correctly w/o
the cast in gcc 4.4.3 on Ubuntu.


> Lee - K5DAT
> Murphy, TX
>
> Index: src/rac_data.c
===================================================================
RCS file: /cvsroot/xastir/xastir/src/rac_data.c,v
retrieving revision 1.21
diff -w -u -r1.21 rac_data.c
--- src/rac_data.c    31 Jan 2010 02:12:25 -0000    1.21
+++ src/rac_data.c    8 Nov 2010 18:23:30 -0000
@@ -251,12 +251,12 @@
         if (callsign[5] == '-')
             (void)chomp(callsign,5);

-        while (!feof(fdb) && strncmp((char *)&racdata, callsign, 6) < 0)
+        while (!feof(fdb) && strncmp((char *)&racdata, callsign, 6) < 0) {

 //WE7U
 // Problem here:  We're sticking 8 bytes too many into racdata!
-            rc = fgets((char *)&racdata, sizeof(racdata), fdb);
-
+            rc = fgets(&racdata, sizeof(racdata), fdb);
+    }
     } else
         fprintf(stderr,"Search:Could not open RAC data base: %s\n",
get_data_base_dir("fcc/AMACALL.LST") );



More information about the Xastir mailing list