[asterisk-commits] murf: branch murf/bug11210 r106170 - /team/murf/bug11210/channels/chan_sip.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Mar 5 13:01:29 CST 2008
Author: murf
Date: Wed Mar 5 13:01:29 2008
New Revision: 106170
URL: http://svn.digium.com/view/asterisk?view=rev&rev=106170
Log:
only remove extension if it exists. Avoids Warnings generated by register_peer_exten at module unload time.
Modified:
team/murf/bug11210/channels/chan_sip.c
Modified: team/murf/bug11210/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug11210/channels/chan_sip.c?view=diff&rev=106170&r1=106169&r2=106170
==============================================================================
--- team/murf/bug11210/channels/chan_sip.c (original)
+++ team/murf/bug11210/channels/chan_sip.c Wed Mar 5 13:01:29 2008
@@ -3588,6 +3588,7 @@
{
char multi[256];
char *stringp, *ext, *context;
+ struct pbx_find_info q = { .stacklen = 0 };
/* XXX note that global_regcontext is both a global 'enable' flag and
* the name of the global regexten context, if not specified
@@ -3611,7 +3612,7 @@
if (onoff)
ast_add_extension(context, 1, ext, 1, NULL, NULL, "Noop",
ast_strdup(peer->name), ast_free_ptr, "SIP");
- else
+ else if (pbx_find_extension(NULL, NULL, &q, context, ext, 1, NULL, "", E_MATCH))
ast_context_remove_extension(context, ext, 1, NULL);
}
}
More information about the asterisk-commits
mailing list