[svn-commits] oej: branch oej/pinetree-trunk r188286 - /team/oej/pinetree-trunk/channels/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Apr 14 09:53:03 CDT 2009


Author: oej
Date: Tue Apr 14 09:52:59 2009
New Revision: 188286

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=188286
Log:
Still doesn't compile on my SAAB. But well, at least on something else.

Modified:
    team/oej/pinetree-trunk/channels/chan_sip.c

Modified: team/oej/pinetree-trunk/channels/chan_sip.c
URL: http://svn.digium.com/svn-view/asterisk/team/oej/pinetree-trunk/channels/chan_sip.c?view=diff&rev=188286&r1=188285&r2=188286
==============================================================================
--- team/oej/pinetree-trunk/channels/chan_sip.c (original)
+++ team/oej/pinetree-trunk/channels/chan_sip.c Tue Apr 14 09:52:59 2009
@@ -2572,7 +2572,7 @@
 static int set_address_from_contact(struct sip_pvt *pvt);
 static int find_via_address(int findsecond, struct sip_pvt *p, struct sip_request *req, struct sockaddr_in *addr);
 static int get_address_from_via(const char *via, char *hostname, size_t hostlen, char *port, size_t portlen, struct sockaddr_in *addr);
-static void check_via(struct sip_pvt *p, struct sip_request *req);
+static void check_via(struct sip_pvt *p, const struct sip_request *req);
 static char *get_calleridname(const char *input, char *output, size_t outputsize);
 static int get_rpid(struct sip_pvt *p, struct sip_request *oreq);
 static int get_rdnis(struct sip_pvt *p, struct sip_request *oreq, char **name, char **number, int *reason);
@@ -13391,7 +13391,7 @@
 	if (c)
 		*c = '\0';
 
-	if (strncasecmp(viaheader, "SIP/2.0/UDP", 11) && strncasecmp(via, "SIP/2.0/TCP", 11) && strncasecmp(via, "SIP/2.0/TLS", 11)) {
+	if (strncasecmp(via, "SIP/2.0/UDP", 11) && strncasecmp(via, "SIP/2.0/TCP", 11) && strncasecmp(via, "SIP/2.0/TLS", 11)) {
 		ast_log(LOG_WARNING, "Don't know how to communicate via '%s'\n", via);
 		return;
 	}
@@ -13490,7 +13490,7 @@
 			struct sockaddr_in matchaddr;
 			/* Go find the peer */
 			find_via_address(peer->matchrule == MATCH_SECONDVIA, p, req, &matchaddr);
-			peer = find_peer(NULL, &matchaddr, 1, 0);
+			peer = find_peer(NULL, &matchaddr, TRUE, FINDPEERS, FALSE);
 		}
 	}
 
@@ -23659,6 +23659,17 @@
 			peer->maxcallbitrate = atoi(v->value);
 			if (peer->maxcallbitrate < 0)
 				peer->maxcallbitrate = default_maxcallbitrate;
+		} else if (!strcasecmp(v->name, "matchrule")) {
+			if (!strcasecmp(v->value, "normal")) {
+				peer->matchrule = MATCH_NORMAL;
+			} else if (!strcasecmp(v->value, "lastvia")) {
+				peer->matchrule = MATCH_LASTVIA;
+			} else if (!strcasecmp(v->value, "secondvia")) {
+				peer->matchrule = MATCH_SECONDVIA;
+			} else {
+				ast_log(LOG_WARNING, "Matchrule=%s is not a valid setting. lastvia|secondvia|normal are valid options.\n", v->value);
+				peer->matchrule = MATCH_NORMAL;
+			}
 		} else if (!strcasecmp(v->name, "session-timers")) {
 			int i = (int) str2stmode(v->value); 
 			if (i < 0) {
@@ -24405,17 +24416,6 @@
 			} else {
 				ast_log(LOG_WARNING, "Invalid hash_dialog size '%s' at line %d of %s -- should be much larger than 2\n", v->value, v->lineno, config);
 			}
-		} else if (!strcasecmp(v->name, "matchrule")) {
-			if (!strcasecmp(v->value, "normal")) {
-				peer->matchrule = MATCH_NORMAL;
-			} else if (!strcasecmp(v->value, "lastvia")) {
-				peer->matchrule = MATCH_LASTVIA;
-			} else if (!strcasecmp(v->value, "secondvia")) {
-				peer->matchrule = MATCH_SECONDVIA;
-			} else {
-				ast_log(LOG_WARNING, "Matchrule=%s is not a valid setting. lastvia|secondvia|normal are valid options.\n", v->value);
-				peer->matchrule = MATCH_NORMAL;
-			}
 		} else if (!strcasecmp(v->name, "qualify")) {
 			if (!strcasecmp(v->value, "no")) {
 				default_qualify = 0;




More information about the svn-commits mailing list