diff options
author | Timo Teräs <timo.teras@iki.fi> | 2012-01-31 09:25:17 +0200 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2012-01-31 09:25:17 +0200 |
commit | be8765cd3a54d5182ccf996b6dce95ae4acd2602 (patch) | |
tree | f6875c1259ef0c2febd55028a16f4051eb970220 /main/asterisk/ASTERISK-19106.patch | |
parent | 1ca00eb19499a0b605d9dc766565fc7a4e7067ce (diff) | |
download | aports-be8765cd3a54d5182ccf996b6dce95ae4acd2602.tar.bz2 aports-be8765cd3a54d5182ccf996b6dce95ae4acd2602.tar.xz |
main/asterisk: rebase ASTERISK-19106.patch for 10.1.0
It was from 10-branch, but appears that chan_sip already got
incompatible changes for 10.2.0-rc1 that conflict with this
commit.
Diffstat (limited to 'main/asterisk/ASTERISK-19106.patch')
-rw-r--r-- | main/asterisk/ASTERISK-19106.patch | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/main/asterisk/ASTERISK-19106.patch b/main/asterisk/ASTERISK-19106.patch index d66c4744d5..dd23733e3f 100644 --- a/main/asterisk/ASTERISK-19106.patch +++ b/main/asterisk/ASTERISK-19106.patch @@ -210,19 +210,19 @@ index e1dfaea..698894f 100644 /* If the initial tranmission failed, we may not have an existing dialog, @@ -13510,7 +13576,12 @@ static int transmit_register(struct sip_registry *r, int sipmethod, const char * - * or peer NULL. Since we're only concerned with its existence, we're not going to - * bother getting a ref to the proxy*/ - if (!obproxy_get(r->call, peer)) { -- ast_dnsmgr_lookup(peer ? peer->tohost : r->hostname, &r->us, &r->dnsmgr, sip_cfg.srvlookup ? transport : NULL); -+ registry_addref(r, "add reg ref for dnsmgr"); -+ ast_dnsmgr_lookup_cb(peer ? peer->tohost : r->hostname, &r->us, &r->dnsmgr, sip_cfg.srvlookup ? transport : NULL, on_dns_update_registry, r); -+ if (!r->dnsmgr) { -+ /*dnsmgr refresh disabled, no reference added! */ -+ registry_unref(r, "remove reg ref, dnsmgr disabled"); -+ } - } + peer = sip_find_peer(r->hostname, NULL, TRUE, FINDPEERS, FALSE, 0); + snprintf(transport, sizeof(transport), "_%s._%s",get_srv_service(r->transport), get_srv_protocol(r->transport)); /* have to use static sip_get_transport function */ + r->us.ss.ss_family = get_address_family_filter(&bindaddr); /* Filter address family */ +- ast_dnsmgr_lookup(peer ? peer->tohost : r->hostname, &r->us, &r->dnsmgr, sip_cfg.srvlookup ? transport : NULL); ++ registry_addref(r, "add reg ref for dnsmgr"); ++ ast_dnsmgr_lookup_cb(peer ? peer->tohost : r->hostname, &r->us, &r->dnsmgr, sip_cfg.srvlookup ? transport : NULL, on_dns_update_registry, r); ++ if (!r->dnsmgr) { ++ /*dnsmgr refresh disabled, no reference added! */ ++ registry_unref(r, "remove reg ref, dnsmgr disabled"); ++ } if (peer) { peer = sip_unref_peer(peer, "removing peer ref for dnsmgr_lookup"); + } @@ -13543,18 +13614,21 @@ static int transmit_register(struct sip_registry *r, int sipmethod, const char * } @@ -287,9 +287,9 @@ index e1dfaea..698894f 100644 ast_string_field_set(peer, tohost, srvlookup); @@ -28817,7 +28895,7 @@ static void cleanup_all_regs(void) - /* First, destroy all outstanding registry calls */ /* This is needed, since otherwise active registry entries will not be destroyed */ ASTOBJ_CONTAINER_TRAVERSE(®l, 1, do { /* regl is locked */ + - ASTOBJ_RDLOCK(iterator); /* now regl is locked, and the object is also locked */ + ASTOBJ_WRLOCK(iterator); /* now regl is locked, and the object is also locked */ if (iterator->call) { |