aboutsummaryrefslogtreecommitdiffstats
path: root/pbx.c
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2007-02-08 22:48:47 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2007-02-08 22:48:47 +0000
commitd0b2229ebdf2a6569b092d4adf4ad7a984b2ef15 (patch)
tree9486a727b8e1260f7df7e56c9f2dbfa10936f2a4 /pbx.c
parent908810e23f7815eccab97be7023a1aed15f89464 (diff)
merge up to branch 1.2 and re-enable automerge
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2-netsec@53671 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx.c')
-rw-r--r--pbx.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/pbx.c b/pbx.c
index 5fae072ca..7a8f9979d 100644
--- a/pbx.c
+++ b/pbx.c
@@ -974,8 +974,7 @@ static char *substring(const char *value, int offset, int length, char *workspac
return ret;
}
-/*! \brief pbx_retrieve_variable: Support for Asterisk built-in variables and
- functions in the dialplan
+/*! \brief pbx_retrieve_variable: Support for Asterisk built-in variables
---*/
void pbx_retrieve_variable(struct ast_channel *c, const char *var, char **ret, char *workspace, int workspacelen, struct varshead *headp)
{
@@ -2541,8 +2540,10 @@ enum ast_pbx_result ast_pbx_start(struct ast_channel *c)
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
if (ast_pthread_create(&t, &attr, pbx_thread, c)) {
ast_log(LOG_WARNING, "Failed to create new channel thread\n");
+ pthread_attr_destroy(&attr);
return AST_PBX_FAILED;
}
+ pthread_attr_destroy(&attr);
return AST_PBX_SUCCESS;
}
@@ -5125,8 +5126,10 @@ int ast_pbx_outgoing_exten(const char *type, int format, void *data, int timeout
}
ast_hangup(chan);
res = -1;
+ pthread_attr_destroy(&attr);
goto outgoing_exten_cleanup;
}
+ pthread_attr_destroy(&attr);
res = 0;
}
outgoing_exten_cleanup:
@@ -5228,6 +5231,7 @@ int ast_pbx_outgoing_app(const char *type, int format, void *data, int timeout,
if (locked_channel)
*locked_channel = chan;
}
+ pthread_attr_destroy(&attr);
}
} else {
ast_log(LOG_ERROR, "Out of memory :(\n");
@@ -5290,11 +5294,13 @@ int ast_pbx_outgoing_app(const char *type, int format, void *data, int timeout,
ast_mutex_unlock(&chan->lock);
ast_hangup(chan);
res = -1;
+ pthread_attr_destroy(&attr);
goto outgoing_app_cleanup;
} else {
if (locked_channel)
*locked_channel = chan;
}
+ pthread_attr_destroy(&attr);
res = 0;
}
outgoing_app_cleanup: