[asterisk-commits] rizzo: branch rizzo/astobj2 r47717 - /team/rizzo/astobj2/channels/chan_sip.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed Nov 15 18:03:21 MST 2006


Author: rizzo
Date: Wed Nov 15 19:03:21 2006
New Revision: 47717

URL: http://svn.digium.com/view/asterisk?view=rev&rev=47717
Log:
reindent a block


Modified:
    team/rizzo/astobj2/channels/chan_sip.c

Modified: team/rizzo/astobj2/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/rizzo/astobj2/channels/chan_sip.c?view=diff&rev=47717&r1=47716&r2=47717
==============================================================================
--- team/rizzo/astobj2/channels/chan_sip.c (original)
+++ team/rizzo/astobj2/channels/chan_sip.c Wed Nov 15 19:03:21 2006
@@ -16659,39 +16659,39 @@
 			if (!strcasecmp(cat, "general"))	/* skip 'general' */
 				continue;
 
-				hassip = ast_variable_retrieve(ucfg, cat, "hassip");
-				registersip = ast_variable_retrieve(ucfg, cat, "registersip");
-				if (ast_true(hassip) || (!hassip && genhassip)) {
-					peer = build_peer(cat, gen, ast_variable_browse(ucfg, cat), 0);
-					if (peer) {
-						ASTOBJ_CONTAINER_LINK(&peerl,peer);
-						unref_peer(peer);
-						peer_count++;
-					}
+			hassip = ast_variable_retrieve(ucfg, cat, "hassip");
+			registersip = ast_variable_retrieve(ucfg, cat, "registersip");
+			if (ast_true(hassip) || (!hassip && genhassip)) {
+				peer = build_peer(cat, gen, ast_variable_browse(ucfg, cat), 0);
+				if (peer) {
+					ASTOBJ_CONTAINER_LINK(&peerl,peer);
+					unref_peer(peer);
+					peer_count++;
 				}
-				if (ast_true(registersip) || (!registersip && genregistersip)) {
-					char tmp[256];
-					const char *host = ast_variable_retrieve(ucfg, cat, "host");
-					const char *username = ast_variable_retrieve(ucfg, cat, "username");
-					const char *secret = ast_variable_retrieve(ucfg, cat, "secret");
-					const char *contact = ast_variable_retrieve(ucfg, cat, "contact");
-					if (!host)
-						host = ast_variable_retrieve(ucfg, "general", "host");
-					if (!username)
-						username = ast_variable_retrieve(ucfg, "general", "username");
-					if (!secret)
-						secret = ast_variable_retrieve(ucfg, "general", "secret");
-					if (!contact)
-						contact = "s";
-					if (!ast_strlen_zero(username) && !ast_strlen_zero(host)) {
-						if (!ast_strlen_zero(secret))
-							snprintf(tmp, sizeof(tmp), "%s:%s@%s/%s", username, secret, host, contact);
-						else
-							snprintf(tmp, sizeof(tmp), "%s@%s/%s", username, host, contact);
-						if (sip_register(tmp, 0) == 0)
-							registry_count++;
-					}
+			}
+			if (ast_true(registersip) || (!registersip && genregistersip)) {
+				char tmp[256];
+				const char *host = ast_variable_retrieve(ucfg, cat, "host");
+				const char *username = ast_variable_retrieve(ucfg, cat, "username");
+				const char *secret = ast_variable_retrieve(ucfg, cat, "secret");
+				const char *contact = ast_variable_retrieve(ucfg, cat, "contact");
+				if (!host)
+					host = ast_variable_retrieve(ucfg, "general", "host");
+				if (!username)
+					username = ast_variable_retrieve(ucfg, "general", "username");
+				if (!secret)
+					secret = ast_variable_retrieve(ucfg, "general", "secret");
+				if (!contact)
+					contact = "s";
+				if (!ast_strlen_zero(username) && !ast_strlen_zero(host)) {
+					if (!ast_strlen_zero(secret))
+						snprintf(tmp, sizeof(tmp), "%s:%s@%s/%s", username, secret, host, contact);
+					else
+						snprintf(tmp, sizeof(tmp), "%s@%s/%s", username, host, contact);
+					if (sip_register(tmp, 0) == 0)
+						registry_count++;
 				}
+			}
 		}
 		ast_config_destroy(ucfg);
 	}



More information about the asterisk-commits mailing list