From 8a292b30ccd1236b472f0665187a92156c951ec5 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Wed, 26 Mar 2014 17:09:02 +0100 Subject: [PATCH] fix generic publishes not properly terminated. --- coreapi/event.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/coreapi/event.c b/coreapi/event.c index e4d66db3e..731412153 100644 --- a/coreapi/event.c +++ b/coreapi/event.c @@ -107,6 +107,9 @@ void linphone_event_set_publish_state(LinphoneEvent *lev, LinphonePublishState s if (lc->vtable.publish_state_changed){ lc->vtable.publish_state_changed(lev->lc,lev,state); } + if (state==LinphonePublishCleared){ + linphone_event_unref(lev); + } } } @@ -291,7 +294,8 @@ void linphone_event_terminate(LinphoneEvent *lev){ if (lev->publish_state!=LinphonePublishNone){ if (lev->publish_state==LinphonePublishOk){ sal_publish(lev->op,NULL,NULL,NULL,0,NULL); - } + }else sal_op_stop_refreshing(lev->op); + linphone_event_set_publish_state(lev,LinphonePublishCleared); return; }