From e16c93e2ae0e6d89e0ae01d19ef753da3ebc4367 Mon Sep 17 00:00:00 2001 From: Stefan Becker Date: Thu, 5 Dec 2013 09:19:02 +0200 Subject: [PATCH] Fix #222: SIPE crashes when groupchat session expires (VII) We need to drop the dialog from our side before we can call sipe_groupchat_init(), otherwise no INVITE will be sent out. (cherry picked from commit 57f6744f9c2c5dc350c88c74d88a49ea29908704) --- src/core/sipe-groupchat.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/core/sipe-groupchat.c b/src/core/sipe-groupchat.c index 74d22e74..294cbff5 100644 --- a/src/core/sipe-groupchat.c +++ b/src/core/sipe-groupchat.c @@ -373,6 +373,16 @@ static gboolean groupchat_expired_session_response(struct sipe_core_private *sip /* 481 Call Leg Does Not Exist -> server dropped session */ if (msg->response == 481) { + struct sip_session *session = groupchat->session; + struct sip_dialog *dialog = sipe_dialog_find(session, + session->with); + + /* close dialog from our side */ + sip_transport_bye(sipe_private, dialog); + sipe_dialog_remove(session, session->with); + /* dialog is no longer valid */ + + /* re-initialize groupchat session */ groupchat->session = NULL; groupchat->connected = FALSE; sipe_groupchat_init(sipe_private); -- 2.11.4.GIT