[OTR-dev] app_find subroutine for otrl_context_find

Twan Fox twanfox at gmail.com
Fri Apr 28 14:29:35 EDT 2006


Drawing ever closer to a full Trillian plugin, I find myself wanting for 
an application-based extension to the otrl_context_find() function. What 
I mean by that is simple, and similar to how the 
otrl_message_receiving() and _sending() functions accept both a 
new_context function and app_data structure in the event a new context 
is created, to allow the app_data and app_data_free members of the 
ConnContext structure to be populated. The otrl_context_find() should 
take a 2 additional arguments, a function reference that points to a 
search subroutine and a data structure that holds data the additional 
search routine can use to match context to app_data. The returned value 
is likely to be the located ConnContext pointer.

If there is merit in the idea of extending the otrl_context_find() 
function in that way, and it is necessary, I can draft up some code to 
make the appropriate call. It is just so much simpler than attempting to 
walk the userstate->context_root list myself and search through each 
app_data structure for what I want. Alternatively, I suppose that I can 
just write the subroutine and call it myself if otrl_context_find() 
returns nothing. Just seeking feedback.


More information about the OTR-dev mailing list