[OTR-dev] Last-minute change to libotr 4 API

Ian Goldberg ian at cypherpunks.ca
Sun Aug 26 09:46:10 EDT 2012


On Sat, Aug 25, 2012 at 09:03:56PM -0700, Howard Chu wrote:
> Since there are no other uses for this yet, it might be better to make this a
> oneshot function. And change the signature of otrl_poll() to also return a
> polltime. If it returns 0, then no further polling is desired, otherwise the
> return value is the interval till the next desired poll.

I thought of that, but it doesn't quite work.  Or rather, otrl_poll
could *never* return 0, since a new OTR conversation may start at some
later time, and would need to be scheduled to be cleaned.  You'd have to
have *every* otrl_* call by the application have the ability to create
and destroy timers.  So another way to do it would be to have new
callback functions in OtrlMessageUiOps to create and destroy timers.
But that also seems ugly to me, and requires more infrastructure from
the calling app than just "call this function every so often".

> Setting up a permanent alarm/timer in the app seems a bit unfriendly,
> particularly if it is rarely needed.

I totally agree; that's why I'm asking for better ideas.

Thanks for the continuing feedback!

   - Ian



More information about the OTR-dev mailing list