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: Andy Summers
Subject: Re: [Tlf-devel] TLF maintenance release 1.0.1
Date: Wed, 26 Jan 2011 21:12:57 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc14 Thunderbird/3.1.7

Hi again,

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(), 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.

73 Andy, G4KNO.

On 24/01/11 06:06, Thomas Beierlein wrote:
Hi Andy,

thanks for the report.

Am Sun, 23 Jan 2011 21:05:45 +0000
schrieb Andy Summers<address@hidden>:
There's a bug in netkeyer.c since TLF-1.0.0 that I can't figure out.

Its symptoms are that when in SSB mode and you hit, say, F1 to send
that recorded message, cwdaemon gets a PTT=1 command but gets another
PTT=1 at the end of the message when it should get PTT=0. The effect
is that the rig is permanently keyed after pressing the F-key.

I will look into it. But it will be a busy week here and it is possible
that I will find time only the next weekend.

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.

Try the PTT (for the new and old version) and send us the results. That
would be helpful.

Btw, which version of cwdaemon do you use?

73, de Tom DL1JBE.


I've had a look, but I'm confused because the correct string seems to
be sent to the sendto() system call. Even more confusing is if I edit
callinput.c so it sends PTT=0 at the beginning of the message, it
still asserts PTT!

If I revert to netkeyer.c from TLF-0.9.31 PTT works OK again, but I
don't see that much is changed in that file. Another weird thing is
that if I go back to the new version, recompile, it stops working
properly, then go back to the old version and it still doesn't work.
If I then do 'touch netkeyer.h' and recompile it's fixed again.
There's no difference between the two .h files.

My feeling is that sendto() is getting upset somehow, but I'm not
good enough with C to work it out.

Has anyone else seen this, and/or does anyone have any ideas? For the
time being, I'm using netkeyer.c from TLF-0.9.31.

73 Andy, G4KNO.






reply via email to

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