diff options
Diffstat (limited to 'net-misc/asterisk/files/1.6.1/asterisk-1.6.1.1-resolve-peer-not-section-header.patch')
-rw-r--r-- | net-misc/asterisk/files/1.6.1/asterisk-1.6.1.1-resolve-peer-not-section-header.patch | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/net-misc/asterisk/files/1.6.1/asterisk-1.6.1.1-resolve-peer-not-section-header.patch b/net-misc/asterisk/files/1.6.1/asterisk-1.6.1.1-resolve-peer-not-section-header.patch new file mode 100644 index 000000000000..633240e069e1 --- /dev/null +++ b/net-misc/asterisk/files/1.6.1/asterisk-1.6.1.1-resolve-peer-not-section-header.patch @@ -0,0 +1,24 @@ +--- ./asterisk-1.6.1.1.orig/channels/chan_sip.c 2009-04-20 19:08:26.000000000 +0200 ++++ ./asterisk-1.6.1.1/channels/chan_sip.c 2009-06-30 17:00:46.713621713 +0200 +@@ -9969,6 +9969,7 @@ + char tmp[80]; + char addr[80]; + struct sip_pvt *p; ++ struct sip_peer *peer; + int res; + char *fromdomain; + +@@ -9982,8 +9983,12 @@ + + if (r->dnsmgr == NULL) { + char transport[MAXHOSTNAMELEN]; ++ peer = find_peer(r->hostname, NULL, TRUE, FINDPEERS, FALSE); + snprintf(transport, sizeof(transport), "_sip._%s", get_transport(r->transport)); /* have to use static get_transport function */ +- ast_dnsmgr_lookup(r->hostname, &r->us, &r->dnsmgr, global_srvlookup ? transport : NULL); ++ ast_dnsmgr_lookup(peer ? peer->tohost : r->hostname, &r->us, &r->dnsmgr, global_srvlookup ? transport : NULL); ++ if (peer) { ++ unref_peer(peer, "removing peer ref for dnsmgr_lookup"); ++ } + } + + if (r->call) { /* We have a registration */ |