From e8d1503dfb73b8654b62fb12aee64ecf73ed09a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Grisez?= Date: Wed, 11 Oct 2017 15:36:11 +0200 Subject: [PATCH] Fix crash while PUBLISH sending --- coreapi/event.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/coreapi/event.c b/coreapi/event.c index 33f7919b2..a8fe6a043 100644 --- a/coreapi/event.c +++ b/coreapi/event.c @@ -300,7 +300,8 @@ static LinphoneEvent *_linphone_core_create_publish(LinphoneCore *core, Linphone if (!resource && cfg) resource = linphone_proxy_config_get_identity_address(cfg); - lev = linphone_event_new(lc,LinphoneSubscriptionInvalidDir, event,expires); + lev = linphone_event_new_with_op(lc, new SalPublishOp(lc->sal), LinphoneSubscriptionInvalidDir, event); + lev->expires = expires; linphone_configure_op_with_proxy(lc,lev->op,resource,NULL, !!lp_config_get_int(lc->config,"sip","publish_msg_with_contact",0),cfg); lev->op->set_manual_refresher_mode(!lp_config_get_int(lc->config,"sip","refresh_generic_publish",1)); return lev;