(sorry forgot to include list to cc)
Hi Stipe,

the problem is with in octstr_get_cstr (see attached patch).
This patch shall fix this issue , but break other things ;(
Other solution is, to use octsr instead of C-strings in dlr_add. But I think
 , return "(null)" in octstr_get_cstr is not clear ?

Alex

On Tuesday 19 November 2002 22:42, Stipe Tolj wrote:
> > mysql..
> > most the entries are blank and some are "(null)", which could have to do
> > with some of the octstr patches?
>
> hmm, ok, this may be the problem. As we all know blank "" is not NULL.
> I'd expect the entries to be NULLed if no smsbox-id has been given. So
> the question is why are there entries that are blanked ""?
>
> Maybe it's an upgrade problem of the table itself. When you migrated
> to the "new" version, including the boxc_id field, you added another
> field to the table, right?! So when you did this, maybe MySQL has
> added the blanks to the existing entries in the table?!
>
> I'd recomment to update the table and alter it in that way that the
> boxc_id should be NULLed everywhere.
>
> Then send messages with DLR request and check your table if the new
> entries are NULLed or blanked for that specific field. If they are
> NULLed everything is fine, if they are blanked, then I don't know
> where the problem is, but there seems to be one.
>
> Stipe
>
> [EMAIL PROTECTED]
> -------------------------------------------------------------------
> Wapme Systems AG
>
> Vogelsanger Weg 80
> 40470 D�sseldorf
>
> Tel: +49-211-74845-0
> Fax: +49-211-74845-299
>
> E-Mail: [EMAIL PROTECTED]
> Internet: http://www.wapme-systems.de
> -------------------------------------------------------------------
> wapme.net - wherever you are

-- 
Mit besten Gr��en aus K�ln

Dipl.-Ing.
Alexander Malysh
___________________________________

Centrium GmbH
Ehrenstrasse 2
50672 K�ln

Fon: +49 (0221) 277 49 150
Fax: +49 (0221) 277 49 109

email: [EMAIL PROTECTED]
web: http://www.centrium.de
Index: gwlib/octstr.c
===================================================================
RCS file: /home/cvs/gateway/gwlib/octstr.c,v
retrieving revision 1.139
diff -a -u -r1.139 octstr.c
--- gwlib/octstr.c	23 Sep 2002 13:16:13 -0000	1.139
+++ gwlib/octstr.c	19 Nov 2002 21:52:40 -0000
@@ -169,8 +169,7 @@
 
 Octstr *octstr_create_real(const char *cstr)
 {
-    gw_assert(cstr != NULL);
-    return octstr_create_from_data(cstr, strlen(cstr));
+    return (cstr ? octstr_create_from_data(cstr, strlen(cstr)) : NULL);
 }
 
 
@@ -355,7 +354,7 @@
     	    	    	   const char *func)
 {
     if (!ostr)
-        return "(null)";
+        return NULL;
     seems_valid_real(ostr, file, line, func);
     if (ostr->len == 0)
         return "";

Reply via email to