[PATCH] Re: [FYI] smsbox routing patch commited
Alexander Malysh <[email protected]>
| Newsgroups | gmane.comp.mobile.kannel.devel |
|---|---|
| Organization | Centrium GmbH |
| Message-ID | <[email protected]> |
(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
octstr.diff
(text/x-diff, 741 B)
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 "";