[OpenSER-Devel] usrloc permanent records and strptime
Bogdan-Andrei Iancu
bogdan at voice-system.ro
Thu Jun 5 16:21:22 CEST 2008
Hi Juha,
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.
Regards,
Bogdan
Juha Heinanen wrote:
> Henning Westerholt writes:
>
> > in the past there were some flags defined for this purpose (FL_PERMANENT).
> > But now its just
> > #define VALID_CONTACT(c, t) ((c->expires>t) || (c->expires==0))
>
> in that case, i suggest that we go back to the flag, because having a
> special expire value to indicate a permanent contact is clearly a hack.
>
> -- juha
>
> _______________________________________________
> Devel mailing list
> Devel at lists.openser.org
> http://lists.openser.org/cgi-bin/mailman/listinfo/devel
>
>
More information about the Devel
mailing list