[OTR-dev] Is otrl_message_receiving returning 1 erroneously?

Ian Goldberg ian at cypherpunks.ca
Wed Jul 25 08:19:55 EDT 2012


On Tue, Jul 24, 2012 at 09:30:26PM -0700, Chris Ballinger wrote:
> When I initiate an encrypted conversation between ChatSecure and
> Adium, and then cancel the OTR session in Adium, ChatSecure receives
> an OTR message that I assume is telling it that the conversation is
> now no longer secure (or at least that Adium canceled encryption...
> otrl_message_receiving returns 1 for this message). However it seems
> that this message isn't being processed properly on my end because all
> plaintext that goes into the otrl_message_receiving function after
> that message returns "1".

Ah, yes.  If you're in FINISHED (or ENCRYPTED), incoming plaintext
messages are displayed through a callback to let you know that something
weird is going on.

> Here is the specific line where I call otrl_message_receiving:
> https://github.com/chrisballinger/Off-the-Record-iOS/blob/master/Off%20the%20Record/OTRCodec.m#L308
> 
> Do I need to do something else to detect when to go into the
> "finished" state? I had assumed that the callback function
> gone_insecure_cb would be called when this was needed.

No, you haven't actually transitioned to insecure at that point.
There's not a callback that gets invoked when you transition to
"finished".  Do you think there should be one?  Last chance to get it in
before 4.0!  ;-)

Thanks,

   - Ian



More information about the OTR-dev mailing list