> When using DLR with my SMSC that uses SMPP kannel crashes (cvs
> version):
> 
> 2001-12-31 21:42:27 [9] DEBUG: **********>>>>>>>>>>>>>>  SMPP handle_pdu
> Got DELIVER REPORT
> 
> 2001-12-31 21:42:27 [9]
> PANIC: gwlib/octstr.c:2032: seems_valid_real: Assertion `ostr != NULL'
> failed. (Called from gwlib/octstr.c:728:octstr_compare.)

it seems that there is a octstr_compare() call within smsc_smpp.c at
line 449-450 that cause this assertion.

The following atteched patch should fix this NULL pointer assertion
for octstr_compare?! 
Stefan, please try this patch and report and if there are no
objections we will commit the patch to cvs.

Stipe

[EMAIL PROTECTED]
-------------------------------------------------------------------
Wapme Systems AG

Münsterstr. 248
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
--- gateway/gw/smsc_smpp.c.orig Tue Jan  1 14:26:20 2002
+++ gateway/gw/smsc_smpp.c      Tue Jan  1 14:27:26 2002
@@ -446,8 +446,8 @@
             /* we get the following status: DELIVRD, ACCEPTD, 
             EXPIRED, DELETED, UNDELIV, UNKNOWN, REJECTD */
                
-           if ((octstr_compare(stat,octstr_imm("DELIVRD"))==0)
-               || (octstr_compare(stat,octstr_imm("ACCEPTD"))==0))
+           if ((stat != NULL) && ((octstr_compare(stat,octstr_imm("DELIVRD"))==0)
+               || (octstr_compare(stat,octstr_imm("ACCEPTD"))==0)))
                dlrstat = DLR_SUCCESS;
            else
                dlrstat = DLR_FAIL;

Reply via email to