Hi Rene,

I converted validity & deferred to be unix timestamp internally, they were in 
minutes before.
Due to the fact that I didn't know how sqlbox works, I assumed that validity & 
deferred in the
sqlbox tables also stored in minutes therefore this conversion:
        if validity set then (now - unix timestamp) / 60 -> minutes

the counter part is when selecting values from DB and sending to bearerbox:

            /* convert validity and deferred to unix timestamp */
            if (msg->sms.validity != SMS_PARAM_UNDEFINED)
                msg->sms.validity = time(NULL) + msg->sms.validity * 60;
            if (msg->sms.deferred != SMS_PARAM_UNDEFINED)
                msg->sms.deferred = time(NULL) + msg->sms.deferred * 60;

Alex

Am 16.02.2013 um 15:36 schrieb Rene Kluwen <rene.klu...@chimit.nl>:

> Also: in sqlbox.c (function smsbox_to_bearerbox()):
>  
>                /* convert validity & deferred to minutes */
>                 if (msg->sms.validity != SMS_PARAM_UNDEFINED)
>                     msg->sms.validity = (msg->sms.validity - time(NULL))/60;
>                 if (msg->sms.deferred != SMS_PARAM_UNDEFINED)
>                     msg->sms.deferred = (msg->sms.deferred - time(NULL))/60;
>  
> Isn’t this field encoded twice now? Once in smsbox and another time in sqlbox?
>  
> Alexander, you made this change. Please shed some light.
>  
> From: devel-boun...@kannel.org [mailto:devel-boun...@kannel.org] On Behalf Of 
> Rene Kluwen
> Sent: vrijdag 15 februari 2013 15:16
> To: devel@kannel.org
> Subject: Validity perdiod
>  
> I came across an issue since svn version 4956 of smsbox.c, using smpp.
>  
> The logs show the following:
>  
> 2013-02-15 14:52:45 [3144] [7] DEBUG:   validity_period: "711110215159000+"
>  
> This was this afternoon at 14:52. The validity field of the sendsms interface 
> was not set.
>  
> How do I interpret this as “YYMMDDhhmmsstnnp”?
>  
> One of my clients needed to downgrade because of this issue.
>  
> == Rene

Reply via email to