[asterisk-commits] dvossel: branch 1.6.2 r237840 - in /branches/1.6.2: ./ main/pbx.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jan 5 13:30:49 CST 2010


Author: dvossel
Date: Tue Jan  5 13:30:44 2010
New Revision: 237840

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=237840
Log:
Merged revisions 237839 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

........
  r237839 | dvossel | 2010-01-05 13:29:47 -0600 (Tue, 05 Jan 2010) | 19 lines
  
  fixes subscriptions being lost after 'module reload'
  
  During a module reload if multiple extension configs are present,
  such as both extensions.conf and extensions.ael, watchers for one
  config's hints will be lost during the merging of the other config.
  
  This happens because hint watchers are only preserved for the
  current config being merged.  The old context list is destroyed
  after the merging takes place, meaning any watchers that were not
  perserved will be removed.
  
  Now all hints are preserved during merging regardless of what config
  file is being merged.  These hints are only restored if they
  are present within the new context list.
  
  (closes issue #16093)
  Reported by: jlaroff
........

Modified:
    branches/1.6.2/   (props changed)
    branches/1.6.2/main/pbx.c

Propchange: branches/1.6.2/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.2/main/pbx.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.6.2/main/pbx.c?view=diff&rev=237840&r1=237839&r2=237840
==============================================================================
--- branches/1.6.2/main/pbx.c (original)
+++ branches/1.6.2/main/pbx.c Tue Jan  5 13:30:44 2010
@@ -6656,12 +6656,13 @@
 	AST_RWLIST_WRLOCK(&hints);
 	writelocktime = ast_tvnow();
 
-	/* preserve all watchers for hints associated with this registrar */
+	/* preserve all watchers for hints */
 	AST_RWLIST_TRAVERSE(&hints, hint, list) {
-		if (!AST_LIST_EMPTY(&hint->callbacks) && !strcmp(registrar, hint->exten->parent->registrar)) {
+		if (!AST_LIST_EMPTY(&hint->callbacks)) {
 			length = strlen(hint->exten->exten) + strlen(hint->exten->parent->name) + 2 + sizeof(*this);
 			if (!(this = ast_calloc(1, length)))
 				continue;
+			/* this removes all the callbacks from the hint into this. */
 			AST_LIST_APPEND_LIST(&this->callbacks, &hint->callbacks, entry);
 			this->laststate = hint->laststate;
 			this->context = this->data;
@@ -6692,7 +6693,7 @@
 		 */
 		if (exten && exten->exten[0] == '_') {
 			ast_add_extension_nolock(exten->parent->name, 0, this->exten, PRIORITY_HINT, NULL,
-				0, exten->app, ast_strdup(exten->data), ast_free_ptr, registrar);
+				0, exten->app, ast_strdup(exten->data), ast_free_ptr, exten->registrar);
 			/* rwlocks are not recursive locks */
 			exten = ast_hint_extension_nolock(NULL, this->context, this->exten);
 		}




More information about the asterisk-commits mailing list