Kismet Wireless

Kismet Forums

 

Posted by:dragorn
Subject:gpsd.cc: Scan() sometimes fails
Date:15:37:04 30/05/2007

> I'm using gpsd.cc in my own program. First of all i wanna thank you for the easy to use and free client!
>
> But I encountered the following problem:
> Sometimes Scan() returns 0 because "values.size()" does not equal 2 (line 211). I modified the code to print the "live"-string to stdout. This is what i get (when it fails):
> GPSD,P=12.345678 12.345678,A=1234.567,V=0.000,M=3
> /h�@Ah��=��οy�[�@Ah��=�oy�h�ο���ο��v��=����(�οĔ���=▒
>

That'd be it not finding the end of a string and running away into memory somewhere...

> It seems that this happens only (but not everytime) i start a new program or cause some other kind of cpu load.

That'd make sense if it's a timing bug with getting too much data in one read...

> I'm wondering if there might be something wrong with the code, especially line 157 to 162 ...? Or do i just use the client in a wrong way?

What version of the code did you grab? Try the latest gpsd in svn, I've made some fixes to bad behavior in the code over time.

-m


Reply to this message