Re: PATCH: Small bug with DLRs

Alexander Malysh <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <[email protected]>
Hi Ben,

sorry you are right. That was 0x10 and is in my local copy :)
Stipe made commit that changed it:
1.21         (stolj    07-Jan-07): #define      DLR_SMSC_FAIL       0x16

Ok, I will correct it in cvs and commit.

Thanks for pointing it!


Ben Suffolk wrote:

> I had assumed it was a binary bit mask :-
> 
> 00001 Success
> 00010 Fail
> 00100 Buffered
> 01000 SMSC Success
> 10000 SMSC Failed
> 
> Which would tie up with the value of decimal 31(11111)  for
> submission of all DLRs.
> 
> However if the last value is in fact 0x16 (10110) then it would cause
> problems with matching against specific bits like FAIL and BUFFERED.
> 
> I really can't see it should be 0x16 myself.
> 
> In fact just looking in the docs it states its a bit mask :-
> 
> "The value is a bit mask composed of: 1: Delivered to phone, 2: Non-
> Delivered to Phone, 4: Queued on SMSC, 8: Delivered to SMSC, 16: Non-
> Delivered to SMSC"
> 
> Regards
> 
> Ben
> 
> 
> On 3 Apr 2007, at 15:04, Alexander Malysh wrote:
> 
>> Hi,
>>
>> it's pretty simple. If in documentation mentioned 16 then it's hex
>> value and
>> all values except 0x16 match with dec because below 0x10 dec and hex
>> equal :)
>>
>> Ben Suffolk wrote:
>>
>>> Ok,
>>>
>>> Slightly confused then, the SMSC rejected my message at submission,
>>> and so I should have got back a dlr_mask value of 16 (dec) in the DLR
>>> according to the documentation, but I got back 22 (dec). Maybe I
>>> jumped to the wrong conclusion seeing the DLR_SMSC_FAIL set to 0x16
>>> (22 dec) in the header file
>>>
>>> #define       DLR_SUCCESS         0x01
>>> #define       DLR_FAIL            0x02
>>> #define       DLR_BUFFERED        0x04
>>> #define       DLR_SMSC_SUCCESS    0x08
>>> #define       DLR_SMSC_FAIL       0x16
>>>
>>> But does that not strike you as a bit odd though that they all match
>>> the documentation with the exception of DLR_SMSC_FAIL, and looking at
>>> them if you were reading them as dec numbers not hex they would
>>> match. It really does look like a simple typo to me.
>>>
>>> Anyway, if you figure out why I got 22 instead of 16 please let me
>>> know.
>>>
>>> Regards
>>>
>>> Ben
>>>
>>> On 3 Apr 2007, at 14:35, Alexander Malysh wrote:
>>>
>>>> Hi Ben,
>>>>
>>>> your patch is not correct. You will receive SMSC_FAIL or DLR_FAIL
>>>> depending
>>>> on the dlr_mask you used. If you set dlr_mask to request SMSC_FAIL
>>>> then you
>>>> will receive it if only DLR_FAIL requested then DLR_FAIL will be
>>>> set.
>>>>
>>>> Ben Suffolk wrote:
>>>>
>>>>> Just noticed that when the SMSC rejects a message at submission the
>>>>> dlr was set to 22 (0x16) not 16 (0x10). Just a bad define in the
>>>>> header file.
>>>>>
>>>>> Regards
>>>>>
>>>>> Ben
>>>>
>>>> --
>>>> Thanks,
>>>> Alex
>>>>
>>>>
>>
>> --
>> Thanks,
>> Alex
>>
>>

-- 
Thanks,
Alex
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.