Re: [PATCH] Intermediate Notification support for SMPP
Alejandro Guerrieri <[email protected]>
| Newsgroups | gmane.comp.mobile.kannel.devel |
|---|---|
| Message-ID | <[email protected]> |
Alex,
I'm attaching a new patch with indentation similar to it's neighboring
lines and also the naming conventions fixed. Userguide mod is there as
well.
I don't know about other people, but for us it makes a lot of sense to
be able to know the whereabouts of a message while in transit. I've
tested it with a major US carrier and works perfectly.
BTW, without this patch, if kannel happens to receive an intermediate
notification, it'll recognize it as an MO, not a DLR
Regarding the indentation, please check smsbox.c and dlr.h for
example, you'll notice there's a lot of indenting problems and mix of
tabs and spaces all over the place.
For example:
dlr.h
Lines 69-76:
#define<tab>DLR_XXXXX<spaces>0xXX
Lines 78-89:
#define<space>DLR_IS_XXXXX(dlr)<spaces>(DLR_IS.....
smsbox.c, all the code is a mix of tabs and spaces, for example the
validation code on lines 2228-2231:
<4 spaces>if ( dlr_mask < -1 || dlr_mask > 32 ) { /* 00011111 */
<tab>returnerror = octstr_create("DLR-Mask field misformed, rejected");
<tab>goto field_error;
<4 spaces>}
I've used all spaces before, I'm not sure what's the proper way here,
my new patch uses the same approach as it's neighboring lines, though
it's not consistent across the file.
Regards,
--
Alejandro Guerrieri
[email protected]
On 15/05/2009, at 9:26, Alexander Malysh wrote:
> Hi Alex,
>
> I'm +0 for this patch as such because never used intermediate DLRs.
>
> As to the patch itself:
> 1) please fix indents (as usual...)
> 2) DLR_ASK_INTERMEDIATE(dlr) -> DLR_IS_INTERMEDIATE (this is our
> naming schema)
>
> Otherwise patch looks trivial. The only questions is, whether we
> want support intermediate DLRs?
>
> Thanks,
> Alex
>
>
> Am 15.05.2009 um 00:29 schrieb Alejandro Guerrieri:
>
>> Hi,
>>
>> This patch adds support for intermediate notification DLR's on SMPP.
>>
>> According to the SMPP 3.4 spec. section 5.2.17, Intermediate
>> Notifications are enabled by setting the bit 5 (0x10) on the
>> registered_delivery flag. To do this (after applying this patch),
>> you must add 32 to the dlr-mask and it will set the bit on the
>> submit_sm PDU's.
>>
>> The patch also fixes a small glitch on the sscanf dlr parsing. On
>> my tests with a major carrier on the US, it turned out that the
>> value for the "err:" field could be hex-encoded (Alex: I know I
>> shouldn't mix stuff, but this one was just a line: @@ -1269,7
>> +1272,7 @@)
>>
>> I'm writing the userguide docs if this is accepted, as usual ;)
>>
>> Regards,
>> --
>> Alejandro Guerrieri
>> [email protected]
>>
>> <kannel-dlr-intermediate.patch>
>