2005-11-21 Kevin P. Fleming <kpfleming@digium.com>
- * channels/chan_sip.c: ensure that case changes made to peer/user names are not ignored during reload operations
- * channels/chan_iax2.c: ensure that case changes made to peer/user names are not ignored during reload operations
+ * channels/chan_sip.c (build_peer): ensure that case changes made to peer names are not ignored during reload operations
+ (build_peer): when a peer is changed from dynamic to static mode, reset the default port number if no other has been specified
+
+ * channels/chan_iax2.c (build_peer and build_user): ensure that case changes made to peer/user names are not ignored during reload operations
+ (build_peer): when a peer is changed from dynamic to static mode, reset the default port number if no other has been specified
2005-11-21 Josh Roberson <josh@asteriasgi.com>
free(peer);
return NULL;
}
+ if (!peer->addr.sin_port)
+ peer->addr.sin_port = htons(IAX_DEFAULT_PORTNO);
}
if (!maskfound)
inet_aton("255.255.255.255", &peer->mask);
}
if (!strcasecmp(v->name, "outboundproxy"))
obproxyfound=1;
- else
+ else {
ast_copy_string(peer->tohost, v->value, sizeof(peer->tohost));
+ if (!peer->addr.sin_port)
+ peer->addr.sin_port = htons(DEFAULT_SIP_PORT);
+ }
}
} else if (!strcasecmp(v->name, "defaultip")) {
if (ast_get_ip(&peer->defaddr, v->value)) {