diff --git a/include/asterisk/pbx.h b/include/asterisk/pbx.h index e1d7f96e28ec5ca6e0b48c6e33042c9626b83bbf..ae45e5e73ec23d46881bc58ba6ff08ec3540b719 100755 --- a/include/asterisk/pbx.h +++ b/include/asterisk/pbx.h @@ -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) /*! diff --git a/pbx/pbx_config.c b/pbx/pbx_config.c index 0b15e5694728f10fbf9ced37c5906fa442d3b874..8443863540e8b93a3e001048247d75f336ae961c 100755 --- a/pbx/pbx_config.c +++ b/pbx/pbx_config.c @@ -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; }