Add the possibility to delete all the contexts registered by a certain registrar...
authorMartin Pycko <martinp@digium.com>
Mon, 14 Jul 2003 17:16:47 +0000 (17:16 +0000)
committerMartin Pycko <martinp@digium.com>
Mon, 14 Jul 2003 17:16:47 +0000 (17:16 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1187 65c4cc65-6c06-0410-ace0-fbb531ad65f3

include/asterisk/pbx.h
pbx/pbx_config.c

index e1d7f96..ae45e5e 100755 (executable)
@@ -131,8 +131,9 @@ struct ast_context *ast_context_create(struct ast_context **extcontexts, char *n
 //! Merge the temporary contexts into a global contexts list and delete from the global list the ones that are being added
 /*!
  * \param extcontexts pointer to the ast_context structure pointer
+ * \param registar of the context; if it's set the routine will delete all contexts that belong to that registrar; if NULL only the contexts that are specified in extcontexts
  */
-void ast_merge_contexts_and_delete(struct ast_context **extcontexts);
+void ast_merge_contexts_and_delete(struct ast_context **extcontexts, char *registrar);
 
 //! Destroy a context (matches the specified context (or ANY context if NULL)
 /*!
index 0b15e56..8443863 100755 (executable)
@@ -1641,7 +1641,7 @@ static int pbx_load_module(void)
                }
                ast_destroy(cfg);
        }
-       ast_merge_contexts_and_delete(&local_contexts);
+       ast_merge_contexts_and_delete(&local_contexts,registrar);
        return 0;
 }