Author: mmichelson
Date: Thu Mar 19 13:30:43 2015
New Revision: 433170

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=433170
Log:
Switch to a NULL check for DNS answers from ast_strlen_zero.

Since the DNS answer is binary data, it's possible for it appear
to be a zero-length string. A NULL check is more appropriate.


Modified:
    team/group/dns/main/dns_core.c

Modified: team/group/dns/main/dns_core.c
URL: 
http://svnview.digium.com/svn/asterisk/team/group/dns/main/dns_core.c?view=diff&rev=433170&r1=433169&r2=433170
==============================================================================
--- team/group/dns/main/dns_core.c (original)
+++ team/group/dns/main/dns_core.c Thu Mar 19 13:30:43 2015
@@ -382,7 +382,7 @@
                return -1;
        }
 
-       if (ast_strlen_zero(answer) || answer_size == 0) {
+       if (!answer || answer_size == 0) {
                ast_debug(2, "Query '%p': Could not set result information 
since no DNS answer was provided\n",
                        query);
                return -1;


-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

svn-commits mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/svn-commits

Reply via email to