aboutsummaryrefslogtreecommitdiffstats
path: root/pbx/pbx_dundi.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-08-25 17:49:51 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-08-25 17:49:51 +0000
commit48d8fc2dc265b5ff73efeb95b03c3bb645185cbd (patch)
treeb1e23fca700a693a6fff80d0dc78b88b11160e92 /pbx/pbx_dundi.c
parentd073d1b058c0e59d767d83aaf882d48d91ae4d15 (diff)
localize a variable and remove a duplicate error message
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@80897 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx/pbx_dundi.c')
-rw-r--r--pbx/pbx_dundi.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/pbx/pbx_dundi.c b/pbx/pbx_dundi.c
index da9280855..013047afb 100644
--- a/pbx/pbx_dundi.c
+++ b/pbx/pbx_dundi.c
@@ -772,7 +772,6 @@ static int dundi_answer_entity(struct dundi_transaction *trans, struct dundi_ies
int totallen;
int x;
int skipfirst=0;
- struct dundi_ie_data ied;
char eid_str[20];
char *s;
pthread_t lookupthread;
@@ -806,17 +805,16 @@ static int dundi_answer_entity(struct dundi_transaction *trans, struct dundi_ies
trans->thread = 1;
if (ast_pthread_create_detached(&lookupthread, NULL, dundi_query_thread, st)) {
+ struct dundi_ie_data ied = { 0, };
trans->thread = 0;
ast_log(LOG_WARNING, "Unable to create thread!\n");
free(st);
- memset(&ied, 0, sizeof(ied));
dundi_ie_append_cause(&ied, DUNDI_IE_CAUSE, DUNDI_CAUSE_GENERAL, "Out of threads");
dundi_send(trans, DUNDI_COMMAND_EIDRESPONSE, 0, 1, &ied);
return -1;
}
} else {
- ast_log(LOG_WARNING, "Out of memory!\n");
- memset(&ied, 0, sizeof(ied));
+ struct dundi_ie_data ied = { 0, };
dundi_ie_append_cause(&ied, DUNDI_IE_CAUSE, DUNDI_CAUSE_GENERAL, "Out of memory");
dundi_send(trans, DUNDI_COMMAND_EIDRESPONSE, 0, 1, &ied);
return -1;