Commit fcce387a authored by Ian Goldberg's avatar Ian Goldberg

Avoid improperly updating recent_sent_child field

Don't update the recent_sent_child field to point to the master context
just becuase we sent a version 3 COMMIT message (which has no
destination instance).
parent 15edb64f
......@@ -13,6 +13,10 @@
* src/message.c: Correct the logic for handling incoming COMMIT
messages when we've recently sent our own COMMIT message.
* src/message.c: Don't update the recent_sent_child field to
point to the master context just becuase we sent a version 3
COMMIT message (which has no destination instance).
2012-08-24
* README:
......
......@@ -451,8 +451,14 @@ static gcry_error_t send_or_error_auth(const OtrlMessageAppOps *ops,
if (msg && *msg) {
fragment_and_send(ops, opdata, context, msg,
OTRL_FRAGMENT_SEND_ALL, NULL);
context->context_priv->lastsent = time(NULL);
otrl_context_update_recent_child(context, 1);
/* Update the "last sent" fields, unless this is a version 3
* message typing to update the master context (as happens
* when sending a v3 COMMIT message, for example). */
if (context != context->m_context ||
context->auth.protocol_version != 3) {
context->context_priv->lastsent = time(NULL);
otrl_context_update_recent_child(context, 1);
}
}
} else {
if (ops->handle_msg_event) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment