[asterisk-commits] mmichelson: branch 1.6.1 r151421 - in /branches/1.6.1: ./ channels/chan_sip.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Oct 21 18:09:27 CDT 2008
Author: mmichelson
Date: Tue Oct 21 18:09:27 2008
New Revision: 151421
URL: http://svn.digium.com/view/asterisk?view=rev&rev=151421
Log:
Merged revisions 151420 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
........
r151420 | mmichelson | 2008-10-21 18:08:56 -0500 (Tue, 21 Oct 2008) | 10 lines
When attempting to resolve hostnames, we need to be sure
to remove any parameters from the string so that name
resolution succeeds.
(closes issue #13727)
Reported by: fnordian
Patches:
resolvewithouturiparameter.patch uploaded by fnordian (license 110)
........
Modified:
branches/1.6.1/ (props changed)
branches/1.6.1/channels/chan_sip.c
Propchange: branches/1.6.1/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.
Modified: branches/1.6.1/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.1/channels/chan_sip.c?view=diff&rev=151421&r1=151420&r2=151421
==============================================================================
--- branches/1.6.1/channels/chan_sip.c (original)
+++ branches/1.6.1/channels/chan_sip.c Tue Oct 21 18:09:27 2008
@@ -21238,9 +21238,17 @@
if (srvlookup && peer->dnsmgr == NULL) {
char transport[MAXHOSTNAMELEN];
+ char _srvlookup[MAXHOSTNAMELEN];
+ char *params;
+
+ ast_copy_string(_srvlookup, srvlookup, sizeof(_srvlookup));
+ if (params = strchr(_srvlookup, ';')) {
+ *params++ = '\0';
+ }
+
snprintf(transport, sizeof(transport), "_sip._%s", get_transport(peer->socket.type));
- if (ast_dnsmgr_lookup(srvlookup, &peer->addr, &peer->dnsmgr, global_srvlookup ? transport : NULL)) {
+ if (ast_dnsmgr_lookup(_srvlookup, &peer->addr, &peer->dnsmgr, global_srvlookup ? transport : NULL)) {
unref_peer(peer, "getting rid of a peer pointer");
return NULL;
}
More information about the asterisk-commits
mailing list