[asterisk-commits] oej: branch oej/obproxy r53711 -
/team/oej/obproxy/channels/chan_sip.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Thu Feb 8 20:54:04 MST 2007
Author: oej
Date: Thu Feb 8 21:54:03 2007
New Revision: 53711
URL: http://svn.digium.com/view/asterisk?view=rev&rev=53711
Log:
Remove crash for outboundproxy= definition in [peer] section. Thanks, Chris.
Modified:
team/oej/obproxy/channels/chan_sip.c
Modified: team/oej/obproxy/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/oej/obproxy/channels/chan_sip.c?view=diff&rev=53711&r1=53710&r2=53711
==============================================================================
--- team/oej/obproxy/channels/chan_sip.c (original)
+++ team/oej/obproxy/channels/chan_sip.c Thu Feb 8 21:54:03 2007
@@ -15978,19 +15978,21 @@
} else if (!strcasecmp(v->name, "fromuser")) {
ast_copy_string(peer->fromuser, v->value, sizeof(peer->fromuser));
} else if (!strcasecmp(v->name, "outboundproxy")) {
- char *force, *port;
+ char *port, *next, *force;
+ int forceopt = FALSE;
/* Set peer channel variable */
varname = ast_strdupa(v->value);
- force = varname;
+ next = varname;
if ((port = strchr(varname, ':'))) {
*port++ = '\0';
- force = port;
+ next = port;
}
- if ((varval = strchr(force, ','))) {
- *varval++ = '\0';
+ if ((force = strchr(next, ','))) {
+ *force++ = '\0';
+ forceopt = strcmp(force, "force");
}
/* Allocate proxy object */
- peer->outboundproxy = proxy_allocate(varname, port, !strcmp(varval, "force"));
+ peer->outboundproxy = proxy_allocate(varname, port, forceopt);
} else if (!strcasecmp(v->name, "host")) {
if (!strcasecmp(v->value, "dynamic")) {
/* They'll register with us */
More information about the asterisk-commits
mailing list