diff options
author | Richard Mudgett <rmudgett@digium.com> | 2011-11-08 18:02:51 +0000 |
---|---|---|
committer | Richard Mudgett <rmudgett@digium.com> | 2011-11-08 18:02:51 +0000 |
commit | cee432c9d8fdb70971e3f70f4899706dfb55ea95 (patch) | |
tree | d50ed6d0493adb84e4458c5c01713322fb513064 /channels | |
parent | a46f6d142c34c957df541f01afb527355e57faaf (diff) |
Fixed reference to incorrect variable if unknown host configured crash.
* Fixed a LOG_ERROR message referencing the config variable list v that
had previously been processed and became NULL.
* Added error return value set that was missing in an ast_append_ha()
error return path.
(closes issue ASTERISK-18743)
Reported by: Michele
Patches:
issueA18743-fix_dynamic_exclude_static_bad_host_log.patch (license #5674) patch uploaded by Walter Doekes
Tested by: Michele
........
Merged revisions 343851 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 343852 from http://svn.asterisk.org/svn/asterisk/branches/10
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@343853 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_sip.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 7e3104389..c6475c518 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -28119,11 +28119,11 @@ static struct sip_peer *build_peer(const char *name, struct ast_variable *v, str ast_string_field_set(peer, tohost, srvlookup); if (global_dynamic_exclude_static) { - int err = 0; + int ha_error = 0; sip_cfg.contact_ha = ast_append_ha("deny", ast_sockaddr_stringify_addr(&peer->addr), - sip_cfg.contact_ha, &err); - if (err) { - ast_log(LOG_ERROR, "Bad ACL entry in configuration line %d : %s\n", v->lineno, v->value); + sip_cfg.contact_ha, &ha_error); + if (ha_error) { + ast_log(LOG_ERROR, "Bad or unresolved host/IP entry in configuration for peer %s, cannot add to contact ACL\n", peer->name); } } } else if (peer->dnsmgr && !peer->host_dynamic) { |