gpsd-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gpsd-dev] [PATCH] gps2udp: fix port number conversion


From: Ferry Huberts
Subject: Re: [gpsd-dev] [PATCH] gps2udp: fix port number conversion
Date: Thu, 19 Dec 2013 09:55:33 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0



On 19/12/13 02:39, Gary E. Miller wrote:
Yo Ferry!

On Wed, 18 Dec 2013 15:52:00 +0100
Ferry Huberts <address@hidden> wrote:

Without this modification I always get an errno != 0

Rather than mask the error maybe track it down?

Maybe later.

gps2udp outputs a packet for each sentence and we need 1 packet with all sentences, so it's not a fit for our needs.

Maybe I'll look into adding that functionality later but currently I'll have no time to spend on this. I did this patch while evaluating gps2udp.

Sorry ;-)


+       errno = 0;
         portnum = atoi(portname);
         if (errno != 0) {

atoi() can never throw an errno, that makes the follow test never true.
So the test for 'portname' to be a number is bogus and needs to be fixed.

Maybe, for debug, print errno and try to find what is setting it?  Sounds
like maybe another, uncaught, problem earlier in the program.


RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97701
        address@hidden  Tel:+1(541)382-8588


--
Ferry Huberts



reply via email to

[Prev in Thread] Current Thread [Next in Thread]