mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-20 03:59:01 +00:00
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
This commit is contained in:
@@ -202,7 +202,7 @@ out:
|
|||||||
/* If we're leaving the macro normally, restore original information */
|
/* If we're leaving the macro normally, restore original information */
|
||||||
chan->priority = oldpriority;
|
chan->priority = oldpriority;
|
||||||
strncpy(chan->context, oldcontext, sizeof(chan->context) - 1);
|
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 */
|
/* 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);
|
strncpy(chan->exten, oldexten, sizeof(chan->exten) - 1);
|
||||||
if ((offsets = pbx_builtin_getvar_helper(chan, "MACRO_OFFSET"))) {
|
if ((offsets = pbx_builtin_getvar_helper(chan, "MACRO_OFFSET"))) {
|
||||||
|
6
dns.c
6
dns.c
@@ -155,13 +155,13 @@ int ast_search_dns(void *context,
|
|||||||
const char *dname, int class, int type,
|
const char *dname, int class, int type,
|
||||||
int (*callback)(void *context, u_char *answer, int len, u_char *fullanswer))
|
int (*callback)(void *context, u_char *answer, int len, u_char *fullanswer))
|
||||||
{
|
{
|
||||||
#ifdef __Linux__
|
#ifdef linux
|
||||||
struct __res_state dnsstate;
|
struct __res_state dnsstate;
|
||||||
#endif
|
#endif
|
||||||
char answer[MAX_SIZE];
|
char answer[MAX_SIZE];
|
||||||
int res, ret = -1;
|
int res, ret = -1;
|
||||||
|
|
||||||
#ifdef __Linux__
|
#ifdef linux
|
||||||
res_ninit(&dnsstate);
|
res_ninit(&dnsstate);
|
||||||
res = res_nsearch(&dnsstate, dname, class, type, answer, sizeof(answer));
|
res = res_nsearch(&dnsstate, dname, class, type, answer, sizeof(answer));
|
||||||
#else
|
#else
|
||||||
@@ -180,7 +180,7 @@ int ast_search_dns(void *context,
|
|||||||
else
|
else
|
||||||
ret = 1;
|
ret = 1;
|
||||||
}
|
}
|
||||||
#if defined(__Linux__)
|
#if defined(linux)
|
||||||
res_nclose(&dnsstate);
|
res_nclose(&dnsstate);
|
||||||
#else
|
#else
|
||||||
#ifndef __APPLE__
|
#ifndef __APPLE__
|
||||||
|
Reference in New Issue
Block a user