[OpenSER-Devel] usrloc permanent records and strptime

Henning Westerholt henning.westerholt at 1und1.de
Thu Jun 5 14:10:46 CEST 2008


Hi all,

in order to specify an permant usrloc entry in the database one should set the 
expires colum to zero. This is equivalent to a datetime value of '0000-00-00 
00:00:00' (at least in mysql).

Apart from the problem that this value is not valid date for postgres, its not 
possible to convert this value with 'strptime' to an time_t value, as the 
conversion fails. Its possible that this behaviour was changed in the glibc 
some time ago, as i think in the past it worked..

In the "old times" this conversion was not checked, and just a value of zero 
returned. But i don't think this logic was intentionally created.

How we should deal with this problem now? Perhaps just using the 
value '1900-01-01 00:00:01' for permanent contacts?

Cheers,

Henning



More information about the Devel mailing list