[asterisk-commits] file: branch 13 r430664 - /branches/13/res/res_pjsip_outbound_registration.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Jan 15 06:09:55 CST 2015
Author: file
Date: Thu Jan 15 06:09:40 2015
New Revision: 430664
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=430664
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/
Modified:
branches/13/res/res_pjsip_outbound_registration.c
Modified: branches/13/res/res_pjsip_outbound_registration.c
URL: http://svnview.digium.com/svn/asterisk/branches/13/res/res_pjsip_outbound_registration.c?view=diff&rev=430664&r1=430663&r2=430664
==============================================================================
--- branches/13/res/res_pjsip_outbound_registration.c (original)
+++ branches/13/res/res_pjsip_outbound_registration.c Thu Jan 15 06:09:40 2015
@@ -1422,6 +1422,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