Hi,

           I was able to solve the problem once i added the code you
provided to sql_mysql.c file. But i faced other problem when running the
sqlbox again.

          ERROR: MYSQL: You have an error in your SQL syntax; check the
manual that corresponds to your MySQL server version for the right syntax
to use near ''' at line 1

          I been getting this error when i try to pass in value of "%00"
instead of normal text. Was it because of other part of the code that was
not up to date? Was is possibly for u to email the whole set of ur
sqlbox-standalone .c file?

Regards,
SoNG
  -----Original Message-----
  From: Djiby SY [mailto:[EMAIL PROTECTED] Behalf Of Djiby SY
  Sent: Friday, February 15, 2008 7:33 PM
  To: [EMAIL PROTECTED]
  Cc: Andreas Fink; [email protected]
  Subject: Re: Bug on kannel


  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] 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]> wrote:

        Hi,

        My http sending format.
        http://localhost:13013/cgi-bin/sendsms?username=xxxxx&password=xxx
xxx&&fro
        m=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) 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]
        Sent: Friday, February 15, 2008 3:18 PM
        To: <[EMAIL PROTECTED]>
        Cc: [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]> <[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





Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to