Re: Patch to avoid panic of opensmppbox and add EXPIRE status
Alexander Malysh <[email protected]> Mon, 5 Aug 2019 13:12:21 +0200
| Newsgroups | gmane.comp.mobile.kannel.devel |
|---|---|
| Message-ID | <[email protected]> |
--Apple-Mail=_2928C876-159C-44DA-A2F0-86222550D591 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hi, committed to SVN, thanks! Alex > Am 24.11.2017 um 12:03 schrieb =D0=94=D0=B5=D0=BD=D0=B8=D1=81 = =D0=94=D0=B0=D0=B2=D1=8B=D0=B4=D0=BE=D0=B2 <[email protected]>: >=20 > Hi, >=20 > I had crashed the opensmppbox when I've used smsc-route group to route = MT messages out of the box. For example, if you add such block to route = MT from esme test1 to the smsc jasper you'll get panic: >=20 > group =3D smsc-route > smsbox-id =3D test1 > smsc-id =3D jasper >=20 > 2017-11-16 10:36:32 [1578] [0] INFO: Starting to log to file = /var/log/kannel/opensmppbox.log level 0 > 2017-11-16 10:36:32 [1578] [0] INFO: Added logfile = `/var/log/kannel/opensmppbox.log' with level `0'. > 2017-11-16 10:36:32 [1578] [0] DEBUG: Adding smsc routing to id = <jasper> for box id <test1> > 2017-11-16 10:36:32 [1578] [0] PANIC: gwlib/octstr.c:2564: = seems_valid_real: Assertion `ostr->data !=3D NULL' failed. (Called from = gwlib/octstr.c:325:octstr_destroy.) > 2017-11-16 10:36:32 [1578] [0] PANIC: = /usr/local/kannel/sbin/opensmppbox(gw_backtrace+0xae) [0x45654e] > 2017-11-16 10:36:32 [1578] [0] PANIC: = /usr/local/kannel/sbin/opensmppbox(gw_panic+0x15f) [0x4566bf] > 2017-11-16 10:36:32 [1578] [0] PANIC: = /usr/local/kannel/sbin/opensmppbox() [0x45dac0] > 2017-11-16 10:36:32 [1578] [0] PANIC: = /usr/local/kannel/sbin/opensmppbox(octstr_destroy+0x1d) [0x45dfbd] > 2017-11-16 10:36:32 [1578] [0] PANIC: = /usr/local/kannel/sbin/opensmppbox(main+0x8bc) [0x40bf6c] > 2017-11-16 10:36:32 [1578] [0] PANIC: = /lib64/libc.so.6(__libc_start_main+0xf5) [0x7ffff5e7cc05] > 2017-11-16 10:36:32 [1578] [0] PANIC: = /usr/local/kannel/sbin/opensmppbox() [0x40c82a] >=20 > There's an issue of freeing of unallocated pointers. This has been = fixed. >=20 > Another issue found in delivery receipt with EXPIRE status that coming = from smsc to esme with "stat:(null)" status instead of EXPIRED. I have = added the EXPIRE status in msg_to_pdu of opensmppbox. In some cases it's = very important to get this status instead of "(null)" value in delivery = receipt.=20 >=20 > See attached patch. Please share any feedback. >=20 > Thank you. >=20 > -- > Regards, > Denis S.Davydov > <opensmppbox.c.patch> --Apple-Mail=_2928C876-159C-44DA-A2F0-86222550D591 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 <html><head><meta http-equiv=3D"Content-Type" content=3D"text/html; = charset=3Dutf-8"></head><body style=3D"word-wrap: break-word; = -webkit-nbsp-mode: space; line-break: after-white-space;" = class=3D"">Hi,<div class=3D""><br class=3D""></div><div = class=3D"">committed to SVN, thanks!</div><div class=3D""><br = class=3D""></div><div class=3D"">Alex</div><div class=3D""><br = class=3D""><div><br class=3D""><blockquote type=3D"cite" class=3D""><div = class=3D"">Am 24.11.2017 um 12:03 schrieb =D0=94=D0=B5=D0=BD=D0=B8=D1=81 = =D0=94=D0=B0=D0=B2=D1=8B=D0=B4=D0=BE=D0=B2 <<a = href=3D"mailto:[email protected]" = class=3D"">[email protected]</a>>:</div><br = class=3D"Apple-interchange-newline"><div class=3D""><div dir=3D"ltr" = style=3D"caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: = 12px; font-style: normal; font-variant-caps: normal; font-weight: = normal; letter-spacing: normal; text-align: start; text-indent: 0px; = text-transform: none; white-space: normal; word-spacing: 0px; = -webkit-text-stroke-width: 0px; text-decoration: none;" class=3D""><div = class=3D"">Hi,</div><div class=3D""><br class=3D""></div><div class=3D"">I= had crashed the opensmppbox when I've used smsc-route group to route MT = messages out of the box. For example, if you add such block to route MT = from esme test1 to the smsc jasper you'll get panic:</div><div = class=3D""><br class=3D""></div><div class=3D"">group =3D = smsc-route</div><div class=3D"">smsbox-id =3D test1</div><div = class=3D"">smsc-id =3D jasper</div><div class=3D""><br = class=3D""></div><div class=3D"">2017-11-16 10:36:32 [1578] [0] INFO: = Starting to log to file /var/log/kannel/opensmppbox.log level = 0</div><div class=3D"">2017-11-16 10:36:32 [1578] [0] INFO: Added = logfile `/var/log/kannel/opensmppbox.log' with level `0'.</div><div = class=3D"">2017-11-16 10:36:32 [1578] [0] DEBUG: Adding smsc routing to = id <jasper> for box id <test1></div><div class=3D"">2017-11-16= 10:36:32 [1578] [0] PANIC: gwlib/octstr.c:2564: seems_valid_real: = Assertion `ostr->data !=3D NULL' failed. (Called from = gwlib/octstr.c:325:octstr_destroy.)</div><div class=3D"">2017-11-16 = 10:36:32 [1578] [0] PANIC: = /usr/local/kannel/sbin/opensmppbox(gw_backtrace+0xae) = [0x45654e]</div><div class=3D"">2017-11-16 10:36:32 [1578] [0] PANIC: = /usr/local/kannel/sbin/opensmppbox(gw_panic+0x15f) [0x4566bf]</div><div = class=3D"">2017-11-16 10:36:32 [1578] [0] PANIC: = /usr/local/kannel/sbin/opensmppbox() [0x45dac0]</div><div = class=3D"">2017-11-16 10:36:32 [1578] [0] PANIC: = /usr/local/kannel/sbin/opensmppbox(octstr_destroy+0x1d) = [0x45dfbd]</div><div class=3D"">2017-11-16 10:36:32 [1578] [0] PANIC: = /usr/local/kannel/sbin/opensmppbox(main+0x8bc) [0x40bf6c]</div><div = class=3D"">2017-11-16 10:36:32 [1578] [0] PANIC: = /lib64/libc.so.6(__libc_start_main+0xf5) [0x7ffff5e7cc05]</div><div = class=3D"">2017-11-16 10:36:32 [1578] [0] PANIC: = /usr/local/kannel/sbin/opensmppbox() [0x40c82a]</div><div class=3D""><br = class=3D""></div><div class=3D"">There's an issue of freeing of = unallocated pointers. This has been fixed.</div><div class=3D""><br = class=3D""></div><div class=3D"">Another issue found in delivery receipt = with EXPIRE status that coming from smsc to esme with "stat:(null)" = status instead of EXPIRED. I have added the EXPIRE status = in msg_to_pdu of opensmppbox. In some cases it's very important to = get this status instead of "(null)" value in delivery = receipt. </div><div class=3D""><br class=3D""></div><div = class=3D"">See attached patch. Please share any feedback.</div><div = class=3D""><br class=3D""></div><div class=3D"">Thank you.</div><div = class=3D""><br class=3D""></div><div class=3D""><div = class=3D"gmail_signature">--<br class=3D"">Regards,</div></div><div = class=3D"gmail_signature">Denis S.Davydov</div></div><span = id=3D"cid:[email protected]"><opensm= ppbox.c.patch></span><style = class=3D"">ul[class*=3D'mb-extra__public-links'], = ul[class*=3D'mb-note__public-links'], ul[class*=3D'mb-task__public-links']= { display: none !important; }</style></div></blockquote></div><br = class=3D""></div></body></html>= --Apple-Mail=_2928C876-159C-44DA-A2F0-86222550D591--