[OpenSER-Devel] usrloc permanent records and strptime
Bogdan-Andrei Iancu
bogdan at voice-system.ro
Fri Jun 6 17:01:51 CEST 2008
Hi Henning,
I was not aware of this issue - so far nobody reported and I personally
do not use permanent contacts with usrloc.
Better open a bug report and let's work on it..
Thanks and regards,
Bogdan
Henning Westerholt wrote:
> On Thursday 05 June 2008, Bogdan-Andrei Iancu wrote:
>
>> It was not a hack. This change was introduced while adding the db_only
>> mode in usrloc. The problem was that db_only mode operates only against
>> DB (via queries) and it was very complicated to run queries to check
>> expires value and some certain flag value, mainly because:
>>
>> 1. this is a limitation of SQL, especially it is not portable across
>> all SQL implementations (see the recent discussion about oracle not
>> supporting the binary or operator);
>> 2. also, raw queries are required (binary ops are not supported by DB
>> API) - using them will make impossible the usage of all DB backends
>> (like db_text) as it is something backend specific.
>>
>> The idea was to replace the FL_PERMANENT flag with the 0 value for
>> expires - both mean the contact will never expire.
>>
>
> Hi Bogdan,
>
> expires is a time_t value. Zero is here defined as 1970-01-01 00:00:00 UTC.
> But this is not portable for different timezones (at least on mysql), as
> mysql don't support timezones in datetime columns.
>
> For example on my system i need to specify 1970-01-01 01:00:00 to get the
> usrloc logic working. But daylight changes, or using different timezones will
> break this again. So i think i'll use just the usrloc expires default
> 2020-05-28 21:32:15 in my database.
>
> Perhaps it makes sense to remove this usrloc permanent contact handling
> altogether, if its not working stable.
>
> Cheers,
>
> Henning
>
>
More information about the Devel
mailing list