diff options
-rw-r--r-- | main/dns.c | 6 | ||||
-rw-r--r-- | main/srv.c | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/main/dns.c b/main/dns.c index 4884406cb..ad1673830 100644 --- a/main/dns.c +++ b/main/dns.c @@ -189,6 +189,7 @@ static int dns_parse_answer(void *context, unsigned char *fullanswer = answer; struct dn_answer *ans; dns_HEADER *h; + int ret = 0; int res; int x; @@ -234,14 +235,13 @@ static int dns_parse_answer(void *context, ast_log(LOG_WARNING, "Failed to parse result\n"); return -1; } - if (res > 0) - return 1; + ret = 1; } } answer += ntohs(ans->size); len -= ntohs(ans->size); } - return 0; + return ret; } #ifndef HAVE_RES_NINIT diff --git a/main/srv.c b/main/srv.c index 3950e255f..1899e8b8f 100644 --- a/main/srv.c +++ b/main/srv.c @@ -137,7 +137,7 @@ static int srv_callback(void *context, unsigned char *answer, int len, unsigned if (entry) AST_LIST_INSERT_TAIL(&c->entries, entry, list); - return 1; + return 0; } /* Do the bizarre SRV record weight-handling algorithm |