summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlle Johansson <oej@edvina.net>2006-06-12 20:07:35 +0000
committerOlle Johansson <oej@edvina.net>2006-06-12 20:07:35 +0000
commit1ec28daa303bc112cdc5faa2c4cca50302a60c81 (patch)
treeb67ec21886a12ad4a791ce3da833d79b25ce6287
parent2ab4e1254949988a490290d7a2db1c91f3fe50c3 (diff)
Formatting fix and doxygen update
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33689 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r--channels/chan_sip.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 949ccb769..de01a0d52 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -1610,14 +1610,13 @@ static void build_via(struct sip_pvt *p)
}
/*! \brief NAT fix - decide which IP address to use for ASterisk server?
- * Only used for outbound registrations */
+ *
+ * Using the localaddr structure built up with localnet statements in sip.conf
+ * apply it to their address to see if we need to substitute our
+ * externip or can get away with our internal bindaddr
+ */
static enum sip_result ast_sip_ouraddrfor(struct in_addr *them, struct in_addr *us)
{
- /*
- * Using the localaddr structure built up with localnet statements
- * apply it to their address to see if we need to substitute our
- * externip or can get away with our internal bindaddr
- */
struct sockaddr_in theirs, ours;
/* Get our local information */
@@ -1642,7 +1641,6 @@ static enum sip_result ast_sip_ouraddrfor(struct in_addr *them, struct in_addr *
if (option_debug) {
char iabuf[INET_ADDRSTRLEN];
ast_inet_ntoa(iabuf, sizeof(iabuf), *(struct in_addr *)&them->s_addr);
-
ast_log(LOG_DEBUG, "Target address %s is not local, substituting externip\n", iabuf);
}
} else if (bindaddr.sin_addr.s_addr)
@@ -3834,7 +3832,7 @@ static struct sip_pvt *sip_alloc(ast_string_field callid, struct sockaddr_in *si
if (sin) {
p->sa = *sin;
- if (ast_sip_ouraddrfor(&p->sa.sin_addr,&p->ourip))
+ if (ast_sip_ouraddrfor(&p->sa.sin_addr, &p->ourip))
p->ourip = __ourip;
} else
p->ourip = __ourip;
@@ -13762,7 +13760,7 @@ static int sip_poke_peer(struct sip_peer *peer)
}
/* Recalculate our side, and recalculate Call ID */
- if (ast_sip_ouraddrfor(&p->sa.sin_addr,&p->ourip))
+ if (ast_sip_ouraddrfor(&p->sa.sin_addr, &p->ourip))
p->ourip = __ourip;
build_via(p);
build_callid_pvt(p);
@@ -13912,7 +13910,7 @@ static struct ast_channel *sip_request_call(const char *type, int format, void *
if (ast_strlen_zero(p->peername) && ext)
ast_string_field_set(p, peername, ext);
/* Recalculate our side, and recalculate Call ID */
- if (ast_sip_ouraddrfor(&p->sa.sin_addr,&p->ourip))
+ if (ast_sip_ouraddrfor(&p->sa.sin_addr, &p->ourip))
p->ourip = __ourip;
build_via(p);
build_callid_pvt(p);