Re: [PATCH] SMPP DLR item scan (old way)

2016-05-09 Thread Stipe Tolj

Am 27.04.2016 14:04, schrieb Stipe Tolj:

Hi list,

we had a case recently with an SMSC that provided the following SMPP DLR
payload:

id:2516372655 submit date:1604131525 done date:1604131525 stat:DELIVRD

which of course doesn't comply with the official DLR format of SMPP v3.4
spec. Nevertheless, we have a way to scan for needed items of the DLR
payload in gw/smsc/smsc_smpp.c, even if the sscanf() way doesn't work out.

But, it was not recognizing the 'stat:DELIVRD' part, due that it assumes
there is ALWAYS a ' ' character trailing the item sequence, which is not
the case here.

Since we DO only need the msg ID and the stat itself for the DLR lookup,
this would result in a false negative state here, since the stat would
not be recognized and defaults to DLR FAIL.

The following patch simply takes into account that the "fallback mode"
scan does obey that an item MAY end in the end-of-line, without a space.
It does not impact any current pattern matching.

If qualified objections arise, I will be committing the patch these days.



thanks for reviewing, committed to svn trunk.

--
Best Regards,
Stipe Tolj

---
Düsseldorf, NRW, Germany

Kannel Foundation tolj.org system architecture
http://www.kannel.org/http://www.tolj.org/

stolj at kannel.org   st at tolj.org
---



Re: [PATCH] SMPP DLR item scan (old way)

2016-04-30 Thread amalysh
Hi,

looks ok, +1.

Alex

> Am 27.04.2016 um 14:04 schrieb Stipe Tolj :
> 
> Hi list,
> 
> we had a case recently with an SMSC that provided the following SMPP DLR 
> payload:
> 
>  id:2516372655 submit date:1604131525 done date:1604131525 stat:DELIVRD
> 
> which of course doesn't comply with the official DLR format of SMPP v3.4 
> spec. Nevertheless, we have a way to scan for needed items of the DLR payload 
> in gw/smsc/smsc_smpp.c, even if the sscanf() way doesn't work out.
> 
> But, it was not recognizing the 'stat:DELIVRD' part, due that it assumes 
> there is ALWAYS a ' ' character trailing the item sequence, which is not the 
> case here.
> 
> Since we DO only need the msg ID and the stat itself for the DLR lookup, this 
> would result in a false negative state here, since the stat would not be 
> recognized and defaults to DLR FAIL.
> 
> The following patch simply takes into account that the "fallback mode" scan 
> does obey that an item MAY end in the end-of-line, without a space. It does 
> not impact any current pattern matching.
> 
> If qualified objections arise, I will be committing the patch these days.
> 
> -- 
> Best Regards,
> Stipe Tolj
> 
> ---
> Düsseldorf, NRW, Germany
> 
> Kannel Foundation tolj.org system architecture
> http://www.kannel.org/http://www.tolj.org/
> 
> stolj at kannel.org   st at tolj.org
> ---
> 




RE: [PATCH] SMPP DLR item scan (old way)

2016-04-29 Thread Rene Kluwen
+1 from me.

-Oorspronkelijk bericht-
Van: devel [mailto:devel-boun...@kannel.org] Namens Stipe Tolj
Verzonden: woensdag 27 april 2016 14:05
Aan: devel@kannel.org
Onderwerp: [PATCH] SMPP DLR item scan (old way)

Hi list,

we had a case recently with an SMSC that provided the following SMPP DLR
payload:

   id:2516372655 submit date:1604131525 done date:1604131525 stat:DELIVRD

which of course doesn't comply with the official DLR format of SMPP v3.4
spec. Nevertheless, we have a way to scan for needed items of the DLR
payload in gw/smsc/smsc_smpp.c, even if the sscanf() way doesn't work out.

But, it was not recognizing the 'stat:DELIVRD' part, due that it assumes
there is ALWAYS a ' ' character trailing the item sequence, which is not the
case here.

Since we DO only need the msg ID and the stat itself for the DLR lookup,
this would result in a false negative state here, since the stat would not
be recognized and defaults to DLR FAIL.

The following patch simply takes into account that the "fallback mode" 
scan does obey that an item MAY end in the end-of-line, without a space. 
It does not impact any current pattern matching.

If qualified objections arise, I will be committing the patch these days.

--
Best Regards,
Stipe Tolj

---
Düsseldorf, NRW, Germany

Kannel Foundation tolj.org system architecture
http://www.kannel.org/http://www.tolj.org/

stolj at kannel.org   st at tolj.org
---