From: Luigi Rizzo Date: Sat, 3 Jun 2006 23:23:24 +0000 (+0000) Subject: fix indentation of a block X-Git-Tag: 1.4.0-beta1~1086 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8dbdd8518b130634fd67c198e854b63afac34cc4;p=thirdparty%2Fasterisk.git fix indentation of a block git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31869 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 734e449233..4b8947f463 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -1980,24 +1980,24 @@ static void register_peer_exten(struct sip_peer *peer, int onoff) if (ast_strlen_zero(global_regcontext)) return; - ast_copy_string(multi, S_OR(peer->regexten, peer->name), sizeof(multi)); - stringp = multi; - while ((ext = strsep(&stringp, "&"))) { - if ((context = strchr(ext, '@'))) { - *context++ = '\0'; /* split ext@context */ - if (!ast_context_find(context)) { - ast_log(LOG_WARNING, "Context %s must exist in regcontext= in sip.conf!\n", context); - continue; - } - } else { - context = global_regcontext; + ast_copy_string(multi, S_OR(peer->regexten, peer->name), sizeof(multi)); + stringp = multi; + while ((ext = strsep(&stringp, "&"))) { + if ((context = strchr(ext, '@'))) { + *context++ = '\0'; /* split ext@context */ + if (!ast_context_find(context)) { + ast_log(LOG_WARNING, "Context %s must exist in regcontext= in sip.conf!\n", context); + continue; } - if (onoff) - ast_add_extension(context, 1, ext, 1, NULL, NULL, "Noop", - ast_strdup(peer->name), free, "SIP"); - else - ast_context_remove_extension(context, ext, 1, NULL); + } else { + context = global_regcontext; } + if (onoff) + ast_add_extension(context, 1, ext, 1, NULL, NULL, "Noop", + ast_strdup(peer->name), free, "SIP"); + else + ast_context_remove_extension(context, ext, 1, NULL); + } } /*! \brief Destroy peer object from memory */