[asterisk-commits] file: trunk r430665 - in /trunk: ./ res/res_pjsip_outbound_registration.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Jan 15 06:10:25 CST 2015
Author: file
Date: Thu Jan 15 06:10:22 2015
New Revision: 430665
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=430665
Log:
res_pjsip_outbound_registration: Fix race condition when reloading and listing registrations.
Due to the split of outbound registration state from configuration it is possible during
a reload for a "pjsip show registrations" CLI command to be executed which gets an older
snapshot of the configuration. This configuration may include outbound registrations which
have been removed due to a reload operation occurring at the same time. The code for
printing the outbound registration did not take this into account but now it does.
AST-1506 #close
Review: https://reviewboard.asterisk.org/r/4338/
........
Merged revisions 430664 from http://svn.asterisk.org/svn/asterisk/branches/13
Modified:
trunk/ (props changed)
trunk/res/res_pjsip_outbound_registration.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-13-merged' - no diff available.
Modified: trunk/res/res_pjsip_outbound_registration.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_pjsip_outbound_registration.c?view=diff&rev=430665&r1=430664&r2=430665
==============================================================================
--- trunk/res/res_pjsip_outbound_registration.c (original)
+++ trunk/res/res_pjsip_outbound_registration.c Thu Jan 15 06:10:22 2015
@@ -1503,6 +1503,10 @@
ast_assert(context->output_buffer != NULL);
+ if (!state) {
+ return 0;
+ }
+
ast_str_append(&context->output_buffer, 0, " %-s/%-*.*s %-16s %-16s\n",
id,
(int) (REGISTRATION_URI_FIELD_LEN - strlen(id)),
More information about the asterisk-commits
mailing list