gnokii-users
[Top][All Lists]
Advanced

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

Re: [PATCH] Using smsd to send multiline sms


From: Joan
Subject: Re: [PATCH] Using smsd to send multiline sms
Date: Fri, 18 Jul 2008 14:29:51 +0200

2008/7/18 Pawel Kot <address@hidden>:
> Hi,
>
> On Fri, Jul 18, 2008 at 14:02, Jan Derfinak <address@hidden> wrote:
>> On Fri, 18 Jul 2008, Pawel Kot wrote:
>>
>> Hi.
>>
>>> Good point. Additionally there another problem. When there's an empty input
>>> sms.user_data[0].u.text[strlen ((gchar *) sms.user_data[0].u.text) - 1]
>>> will cause segfault. However that problem existed already before the patch.
>>
>> You're right. I thinking how to fix it. I can change code to not segfault
>> but I'm not sure if there is any sense to send empty SMS so maybe better
>> option is not to send any sms. What do you think?
>
> I think it may have sense (however limited). I can imagine that for
> automatic reporting systems sometimes you don't need any text. You may
> need just to send an sms (empty or non empty or even empty may have
> some special meaning) to some number to trigger an action.
> On the other hand I'm not sure whether libgnokii supports empty SMS.
>
> As the conclusion: I think we should allow sending an empty SMS from
> SMSD. So if libgnokii fails with this, I'll fix it. And in the code
> above I also think we should allow it.
Just to note I'm not a programmer at all (I'm doing this, because the
code is so clear and I really need the changes) so do trust my code at
all :P
In any case there would be enough with checking the return value of
mlength, if it's greater than 0 then there's a message, otherwise,
it'd depend on how it's initalized.

Since I've been compiling/testing a lot the smsd these days, I've seen
an error that appears both with the standard and the patched source.
In the build I was using last week this error wasn't there, It's not
fatal, so just sending the output to >/dev/null works and I still can
send messages.
I attach the debug (everything was compiled with ./configure
--enable-smsd and the config is exactly the same I was using before)
For more data I launch with /usr/local/bin/smsd -t bluetooth -m file
-c /var/spool/gnokii/ -f/var/log/smsd

Cheers

Attachment: multiline.diff
Description: Text Data

Attachment: smsd_output.txt
Description: Text document


reply via email to

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