[OTR-dev] Using libotr

Martin Milata b42-ml at srck.net
Tue Mar 11 08:06:24 EDT 2014


Hi,
not sure about the other questions but perhaps I can at least answer
this one:

On Tue, Mar 11, 2014 at 01:14:53 +0000, Alex Burzyński wrote:
> Fragmentation policy
> I don't fully understand the how
> OTRL_FRAGMENT_SEND_ALL_(BUT_FIRST|BUT_LAST) work, where those fragments are
> stored and why?
> how my use of otrl_message_sending/receiving() should change depending on
> OtrlFragmentPolicy?

When you use one of the two policies, the fragment that is not sent is
returned in the messagep pointer passed to otrl_message_sending. The
other fragments are sent using the inject_message callback you provided.

The OTRL_FRAGMENT_SEND_ALL_BUT_LAST is useful when you are calling
otrl_message_sending from some kind of a hook that expects you'll have
modified message to send at the end (i.e. the application itself handles
the last fragment). Not sure when OTRL_FRAGMENT_SEND_ALL_BUT_FIRST can
be useful.

Hope that helps,
Martin



More information about the OTR-dev mailing list