mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-04 03:50:31 +00:00
localize a variable and remove a duplicate error message
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@80897 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user