tlf-devel
[Top][All Lists]
Advanced

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

Re: [Tlf-devel] TLF maintenance release 1.0.1


From: Thomas Beierlein
Subject: Re: [Tlf-devel] TLF maintenance release 1.0.1
Date: Thu, 27 Jan 2011 16:15:40 +0100

Hi Andy,

thanks for your analysis so far.

Am Tue, 25 Jan 2011 13:14:11 +0000
schrieb Andy Summers <address@hidden>:

> In meantime can you please start cwdaemon with a '-n' switch added.
> > Then it will not go to daemon and output debug messages what it is
> > doing.
> >
> 
> Yeah, I already did that. cwdaemon just reports 'PTT on' or PTT off'.
> There's no output of the string actually received. With the new
> version of netkeyer.c you get two successive 'PTT on' reports, but
> with the old version you get 'PTT on' followed by 'PTT off', as
> expected.

Just wondering because it works here as expected. 

> Btw, which version of cwdaemon do you use?
> >
> 
> I'm not at home right now, but I believe it's version 0.9. I have no
> reason to believe it's a cwdaemon issue though.

Well there is a 0.9.2 and a 0.9.4 version available. I have 0.9.4 here.
My idea was that cwdaemon may interpret the strings diffenrently. By I
did compare both versions and there are no differences in the relevant
parts.

> Found it. Here's output from diff for the fix:
> 
> netkeyer.c
> 178c178
> <     sendto_rc = sendto(socket_descriptor, buf, strlen(buf),
> ---
>  >     sendto_rc = sendto(socket_descriptor, buf, strlen(buf)+1,
> 
> At some point in the recent past sizeof() was replaced with strlen(), 

That was done by me.

> which seems a legal thing to do, but it doesn't include the null 
> terminating character. Evidently sendto() wants the length including
> the null character, or you get uncertain behaviour. Reverting to
> sizeof() also fixes the problem of course, but isn't as tidy as the
> whole of buf[] is then referenced.
> 
I am just wondering because cwdaemon appends a '\0' at the end of the
received string. So it should do no harm. But anyway I will switch back
to sending an embedded '\0' with the string.

I will use your version with 'strlen(buf) + 1'. New version should go
out on the weekend.

Thanks for the report.

73, de Tom DL1JBE.
-- 
"Do what is needful!"
Ursula LeGuin: Earthsea
--




reply via email to

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