[svn-commits] file: branch file/pjsip-outbound-publish r419935 - /team/file/pjsip-outbound-...
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Sun Aug 3 17:54:24 CDT 2014
Author: file
Date: Sun Aug 3 17:54:22 2014
New Revision: 419935
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=419935
Log:
Fix a bug where cancelling the refresh timer could occur in a non-pjlib thread.
Modified:
team/file/pjsip-outbound-publish/res/res_pjsip_outbound_publish.c
Modified: team/file/pjsip-outbound-publish/res/res_pjsip_outbound_publish.c
URL: http://svnview.digium.com/svn/asterisk/team/file/pjsip-outbound-publish/res/res_pjsip_outbound_publish.c?view=diff&rev=419935&r1=419934&r2=419935
==============================================================================
--- team/file/pjsip-outbound-publish/res/res_pjsip_outbound_publish.c (original)
+++ team/file/pjsip-outbound-publish/res/res_pjsip_outbound_publish.c Sun Aug 3 17:54:22 2014
@@ -215,6 +215,17 @@
ao2_ref(client, -1);
}
+/*! \brief Task for cancelling a refresh timer */
+static int cancel_refresh_timer_task(void *data)
+{
+ struct ast_sip_outbound_publish_client *state = data;
+
+ cancel_publish_refresh(state);
+ ao2_ref(state, -1);
+
+ return 0;
+}
+
/*! \brief Helper function which starts or stops publish clients when applicable */
static void sip_outbound_publish_synchronize(struct ast_sip_event_publisher_handler *removed)
{
@@ -245,7 +256,11 @@
/* If the publisher client has been started but it is going away stop it */
removed->stop_publishing(publish->state);
publish->state->started = 0;
- cancel_publish_refresh(publish->state);
+ if (ast_sip_push_task(NULL, cancel_refresh_timer_task, ao2_bump(publish->state))) {
+ ast_log(LOG_WARNING, "Could not stop refresh timer on client '%s'\n",
+ ast_sorcery_object_get_id(publish));
+ ao2_ref(publish->state, -1);
+ }
}
ao2_ref(publish, -1);
}
More information about the svn-commits
mailing list