aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_sip.c
diff options
context:
space:
mode:
authorrizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b>2006-06-03 23:23:24 +0000
committerrizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b>2006-06-03 23:23:24 +0000
commit093f7912103754c23a8b64501ebbfcfc00288b0e (patch)
tree85223390f3c4c7ca4eab6da6d397bbe2a3ccaf53 /channels/chan_sip.c
parent67054b1ca4054fef86e0a0f3e0a3018f63d5c7a0 (diff)
fix indentation of a block
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@31869 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r--channels/chan_sip.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 734e44923..4b8947f46 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 */