Hello, Thank you for your help, I found my mistake.
After reading your email, I saw that it created a new context, I dig a bit more, and see it was not able to find my contact in the OtrlUserState, simply because I was not using the right account name for the recipient... Indeed, for the connection I was using the account "amoncha...@jabber.de" which got converted to "amoncha...@jabber.de/mbpr-2" and since for test purpose, I was hardcoding the account name in my function calls, I did not saw it... it was not critical for XMPP, but it obviously is for OTR. With the right account name, it now work. Sorry for the trouble, and thanks again for the help! Kind regards Pierre 2015-06-28 23:41 GMT+02:00 Ian Goldberg <i...@cypherpunks.ca>: > On Sun, Jun 28, 2015 at 10:30:31PM +0200, Pierre Lebreton wrote: > > Hello again, > > > > > > So I have been doing some digging, and I can see: > > > > when gone_secure is called, I have context->msgstate equal to > > OTRL_MSGSTATE_ENCRYPTED > > > > > > Just before, "otrl_message_sending", msgstate is still equal to > > OTRL_MSGSTATE_ENCRYPTED for the appropriate contact. > > > > However, during the call, I have a message event triggered, and I can see > > the message "OTRL_MSGEVENT_ENCRYPTION_REQUIRED". > > And the value of context->msgstate changed to OTRL_MSGSTATE_PLAINTEXT > > > > After the end of the call of "otrl_message_sending" the msgstate is equal > > to OTRL_MSGSTATE_PLAINTEXT. > > > > Maybe that would help to identify my mistake? > > > > Thanks > > Is the context pointer the same when context->msgstate is ENCRYPTED and > when it's PLAINTEXT? OTRL_MSGEVENT_ENCRYPTION_REQUIRED will only be > called when the msgstate is already PLAINTEXT, so the question is why > either (a) the context is switching to PLAINTEXT, or (b) a new context > is being created. If you were using OTRv3, I would suspect it has to do > with instance tags and child contexts, but it appears you're just using > OTRv2? > > - Ian > _______________________________________________ > OTR-dev mailing list > OTR-dev@lists.cypherpunks.ca > http://lists.cypherpunks.ca/mailman/listinfo/otr-dev >
_______________________________________________ OTR-dev mailing list OTR-dev@lists.cypherpunks.ca http://lists.cypherpunks.ca/mailman/listinfo/otr-dev