[asterisk-commits] russell: trunk r80897 - /trunk/pbx/pbx_dundi.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Sat Aug 25 12:49:52 CDT 2007
Author: russell
Date: Sat Aug 25 12:49:51 2007
New Revision: 80897
URL: http://svn.digium.com/view/asterisk?view=rev&rev=80897
Log:
localize a variable and remove a duplicate error message
Modified:
trunk/pbx/pbx_dundi.c
Modified: trunk/pbx/pbx_dundi.c
URL: http://svn.digium.com/view/asterisk/trunk/pbx/pbx_dundi.c?view=diff&rev=80897&r1=80896&r2=80897
==============================================================================
--- trunk/pbx/pbx_dundi.c (original)
+++ trunk/pbx/pbx_dundi.c Sat Aug 25 12:49:51 2007
@@ -772,7 +772,6 @@
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 @@
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;
More information about the asterisk-commits
mailing list