From 0a103544e476edd09e6aee480e313d2c4e6e4941 Mon Sep 17 00:00:00 2001 From: Mark Spencer Date: Thu, 4 Mar 2004 05:57:47 +0000 Subject: [PATCH] Copy old extension unless it's ASYNCGOTO (bug #1141) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2326 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- apps/app_macro.c | 2 +- dns.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/app_macro.c b/apps/app_macro.c index 6cb07bd6f8..3189d077b1 100755 --- a/apps/app_macro.c +++ b/apps/app_macro.c @@ -202,7 +202,7 @@ out: /* If we're leaving the macro normally, restore original information */ chan->priority = oldpriority; strncpy(chan->context, oldcontext, sizeof(chan->context) - 1); - if (!chan->_softhangup) { + if (!(chan->_softhangup & AST_SOFTHANGUP_ASYNCGOTO)) { /* Copy the extension, so long as we're not in softhangup, where we could be given an asyncgoto */ strncpy(chan->exten, oldexten, sizeof(chan->exten) - 1); if ((offsets = pbx_builtin_getvar_helper(chan, "MACRO_OFFSET"))) { diff --git a/dns.c b/dns.c index da4527474d..7da02247c3 100755 --- a/dns.c +++ b/dns.c @@ -155,13 +155,13 @@ int ast_search_dns(void *context, const char *dname, int class, int type, int (*callback)(void *context, u_char *answer, int len, u_char *fullanswer)) { -#ifdef __Linux__ +#ifdef linux struct __res_state dnsstate; #endif char answer[MAX_SIZE]; int res, ret = -1; -#ifdef __Linux__ +#ifdef linux res_ninit(&dnsstate); res = res_nsearch(&dnsstate, dname, class, type, answer, sizeof(answer)); #else @@ -180,7 +180,7 @@ int ast_search_dns(void *context, else ret = 1; } -#if defined(__Linux__) +#if defined(linux) res_nclose(&dnsstate); #else #ifndef __APPLE__