Re: Bug on kannel
Djiby SY <[email protected]>
| Newsgroups | gmane.comp.mobile.kannel.devel |
|---|---|
| Message-ID | <[email protected]> |
When updating de mysql DB, the pointer msg->sms.msgdata was passed as
parametter of function and modified inside the function.
This is why the MT message has "\'" in the phone instead of "'".
I have modified the function static Octstr
*get_string_value_or_return_null(Octstr *) in sqlbox_mysql.c
static Octstr *get_string_value_or_return_null(Octstr *str1)
{
Octstr *str;
Octstr *result = NULL;
str = octstr_duplicate(str1);
if (str == NULL) {
return octstr_create("NULL");
}
if (octstr_compare(str, octstr_imm("")) == 0) {
return octstr_create("NULL");
}
octstr_replace(str, octstr_imm("\\"), octstr_imm("\\\\"));
octstr_replace(str, octstr_imm("\'"), octstr_imm("\\\'"));
result = octstr_format("\'%S\'", str);
octstr_destroy(str);
return result;
}
Hope it helps.
Regards
--
Djiby
[email protected] wrote :
> Hi,
> Yes, I been using sqlbox standalone version. Can you email
> me the solution?
>
> Regards,
> SoNG
>
> -----Original Message-----
> *From:* [email protected] [mailto:[email protected]]*On Behalf Of
> *Djiby SY
> *Sent:* Friday, February 15, 2008 5:18 PM
> *To:* [email protected]
> *Cc:* Andreas Fink; [email protected]
> *Subject:* Re: Bug on kannel
>
> Hi,
>
> Do you use sqlbox?
> I think this a bug in sqlbox, I have modified the source of sqlbox
> long time ago and the problem is solved in my side.
>
> Regards
> --
> Djiby
>
>
>
> On Fri, Feb 15, 2008 at 7:40 AM, <[email protected]
> <mailto:[email protected]>> wrote:
>
> Hi,
>
> My http sending format.
> http://localhost:13013/cgi-bin/sendsms?username=xxxxx&password=xxxxxx&&fro
> m=xxxxxxxx&to=xxxxxxx&smsc=xx&coding=0&text=hi%27he
> <http://localhost:13013/cgi-bin/sendsms?username=xxxxx&password=xxxxxx&&from=xxxxxxxx&to=xxxxxxx&smsc=xx&coding=0&text=hi%27he>
>
> I been using the stable version of kannel 1.4.1.
>
> 2008-02-15 15:35:56 [15686] [3] INFO: sendsms
> sender:<xxxxxx:xxxxxxx>
> (127.0.0.1 <http://127.0.0.1>) to:<xxxxxx> msg:<hi'he>
> 2008-02-15 15:35:56 [15686] [3] DEBUG: Stored UUID
> 9c00771a-500e-4aaf-9ef3-51ee481e6c3a
> 2008-02-15 15:35:56 [15686] [3] DEBUG: message length 5, sending 1
> messages
> 2008-02-15 15:35:56 [15686] [3] DEBUG: Status: 202 Answer: <Sent.>
> 2008-02-15 15:35:56 [15686] [3] DEBUG: Delayed reply - wait
> for bearerbox
> 2008-02-15 15:35:56 [15686] [0] DEBUG: Got ACK (0) of
> 9c00771a-500e-4aaf-9ef3-51ee481e6c3a
>
> The message received & stored fine into db. which is "hi'he"
> but when
> received at my operator site. it become "hi\'he".
>
> Regards,
> SoNG
>
> -----Original Message-----
> From: Andreas Fink [mailto:[email protected]
> <mailto:[email protected]>]
> Sent: Friday, February 15, 2008 3:18 PM
> To: <[email protected] <mailto:[email protected]>>
> Cc: [email protected] <mailto:[email protected]>
> Subject: Re: Bug on kannel
>
>
> how do you send it in HTTP?
> show us log?
> does it happen in CVS version?
>
> On 15.02.2008, at 05:10, <[email protected]
> <mailto:[email protected]>> <[email protected]
> <mailto:[email protected]>> wrote:
>
> > Hi,
> >
> > I found out this bug when i doing testing on sending
> out sms.
> >
> > Message send out = he'hi
> >
> > Message received = he\'hi
> >
> > I need to set the charset=UTF-8 and coding type to
> unicode only i
> > will be
> > able to receive the correct sms. Can i know wat is the
> problem that
> > cost
> > this to happen? As far as i know ' sign is not a unicode
> character.
> >
> > Regard,
> > SoNG
>
>