From c3bd5892a66db3391c55465d16bf121c736beb80 Mon Sep 17 00:00:00 2001 From: Kinsey Moore Date: Tue, 9 Aug 2011 17:08:33 +0000 Subject: [PATCH] Allow ENUM query functions to report lookup errors The ENUM dialplan functions do not report DNS query errors properly. It is useful to differentiate between failed query (e.g. non-existent domain) vs. no data records of the appropriate type. This is required to make overlapped dialing work. (closes issue ASTERISK-13769) Review: https://reviewboard.asterisk.org/r/1355/ Patch-by: Timo Teras git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@331201 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- UPGRADE.txt | 5 ++++- funcs/func_enum.c | 6 +++--- main/enum.c | 3 ++- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/UPGRADE.txt b/UPGRADE.txt index 2a56216b57..bd6a63edec 100644 --- a/UPGRADE.txt +++ b/UPGRADE.txt @@ -22,7 +22,10 @@ From 10 to 12: -* No significant changes as of yet. +func_enum: + - ENUM query functions now return a count of -1 on lookup error to + differentiate between a failed query and a successful query with 0 results + matching the specified type. From 1.8 to 10: diff --git a/funcs/func_enum.c b/funcs/func_enum.c index cc4d47a789..4b5fb9f7b8 100644 --- a/funcs/func_enum.c +++ b/funcs/func_enum.c @@ -82,7 +82,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") The number of the result that you want to retrieve. Results start at 1. If this argument is specified as getnum, then it will return the total number of results - that are available. + that are available or -1 on error. @@ -105,7 +105,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")