[asterisk-commits] trunk - r8403 in /trunk: ./ apps/ channels/
funcs/
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Sat Jan 21 13:57:22 MST 2006
Author: russell
Date: Sat Jan 21 14:57:06 2006
New Revision: 8403
URL: http://svn.digium.com/view/asterisk?rev=8403&view=rev
Log:
on this pass, only remove duplicate log messages
Modified:
trunk/apps/app_authenticate.c
trunk/apps/app_chanspy.c
trunk/apps/app_curl.c
trunk/apps/app_db.c
trunk/apps/app_dial.c
trunk/apps/app_dictate.c
trunk/apps/app_directory.c
trunk/apps/app_disa.c
trunk/apps/app_exec.c
trunk/apps/app_externalivr.c
trunk/apps/app_festival.c
trunk/apps/app_hasnewvoicemail.c
trunk/apps/app_image.c
trunk/apps/app_macro.c
trunk/apps/app_meetme.c
trunk/apps/app_mixmonitor.c
trunk/apps/app_osplookup.c
trunk/apps/app_page.c
trunk/apps/app_playback.c
trunk/apps/app_privacy.c
trunk/apps/app_queue.c
trunk/apps/app_random.c
trunk/apps/app_read.c
trunk/apps/app_readfile.c
trunk/apps/app_record.c
trunk/apps/app_sayunixtime.c
trunk/apps/app_senddtmf.c
trunk/apps/app_sendtext.c
trunk/apps/app_setcallerid.c
trunk/apps/app_skel.c
trunk/apps/app_stack.c
trunk/apps/app_talkdetect.c
trunk/apps/app_transfer.c
trunk/apps/app_url.c
trunk/apps/app_userevent.c
trunk/apps/app_verbose.c
trunk/apps/app_voicemail.c
trunk/apps/app_while.c
trunk/apps/app_zapras.c
trunk/channel.c
trunk/channels/chan_agent.c
trunk/channels/chan_iax2.c
trunk/channels/chan_sip.c
trunk/funcs/func_cdr.c
trunk/funcs/func_cut.c
trunk/funcs/func_logic.c
trunk/funcs/func_math.c
trunk/funcs/func_md5.c
trunk/funcs/func_odbc.c
trunk/funcs/func_rand.c
trunk/funcs/func_strings.c
trunk/pbx.c
Modified: trunk/apps/app_authenticate.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_authenticate.c?rev=8403&r1=8402&r2=8403&view=diff
==============================================================================
--- trunk/apps/app_authenticate.c (original)
+++ trunk/apps/app_authenticate.c Sat Jan 21 14:57:06 2006
@@ -128,9 +128,7 @@
}
}
- argcopy = ast_strdupa(data);
- if (!argcopy) {
- ast_log(LOG_ERROR, "Out of memory!\n");
+ if (!(argcopy = ast_strdupa(data))) {
LOCAL_USER_REMOVE(u);
return -1;
}
Modified: trunk/apps/app_chanspy.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_chanspy.c?rev=8403&r1=8402&r2=8403&view=diff
==============================================================================
--- trunk/apps/app_chanspy.c (original)
+++ trunk/apps/app_chanspy.c Sat Jan 21 14:57:06 2006
@@ -383,10 +383,8 @@
struct ast_flags flags;
signed char zero_volume = 0;
- if (!(args = ast_strdupa((char *)data))) {
- ast_log(LOG_ERROR, "Out of memory!\n");
+ if (!(args = ast_strdupa(data)))
return -1;
- }
LOCAL_USER_ADD(u);
Modified: trunk/apps/app_curl.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_curl.c?rev=8403&r1=8402&r2=8403&view=diff
==============================================================================
--- trunk/apps/app_curl.c (original)
+++ trunk/apps/app_curl.c Sat Jan 21 14:57:06 2006
@@ -128,9 +128,7 @@
LOCAL_USER_ACF_ADD(u);
- info = ast_strdupa(data);
- if (!info) {
- ast_log(LOG_ERROR, "Out of memory\n");
+ if (!(info = ast_strdupa(data))) {
LOCAL_USER_REMOVE(u);
return buf;
}
Modified: trunk/apps/app_db.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_db.c?rev=8403&r1=8402&r2=8403&view=diff
==============================================================================
--- trunk/apps/app_db.c (original)
+++ trunk/apps/app_db.c Sat Jan 21 14:57:06 2006
@@ -75,9 +75,7 @@
LOCAL_USER_ADD(u);
- argv = ast_strdupa(data);
- if (!argv) {
- ast_log(LOG_ERROR, "Memory allocation failed\n");
+ if (!(argv = ast_strdupa(data))) {
LOCAL_USER_REMOVE(u);
return 0;
}
@@ -121,9 +119,7 @@
LOCAL_USER_ADD(u);
- argv = ast_strdupa(data);
- if (!argv) {
- ast_log (LOG_ERROR, "Memory allocation failed\n");
+ if (!(argv = ast_strdupa(data))) {
LOCAL_USER_REMOVE(u);
return 0;
}
Modified: trunk/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_dial.c?rev=8403&r1=8402&r2=8403&view=diff
==============================================================================
--- trunk/apps/app_dial.c (original)
+++ trunk/apps/app_dial.c Sat Jan 21 14:57:06 2006
@@ -787,7 +787,6 @@
LOCAL_USER_ADD(u);
if (!(parse = ast_strdupa(data))) {
- ast_log(LOG_WARNING, "Memory allocation failure\n");
LOCAL_USER_REMOVE(u);
return -1;
}
@@ -1627,9 +1626,7 @@
LOCAL_USER_ADD(u);
- announce = ast_strdupa(data);
- if (!announce) {
- ast_log(LOG_ERROR, "Out of memory!\n");
+ if (!(announce = ast_strdupa(data))) {
LOCAL_USER_REMOVE(u);
return -1;
}
Modified: trunk/apps/app_dictate.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_dictate.c?rev=8403&r1=8402&r2=8403&view=diff
==============================================================================
--- trunk/apps/app_dictate.c (original)
+++ trunk/apps/app_dictate.c Sat Jan 21 14:57:06 2006
@@ -110,11 +110,8 @@
snprintf(dftbase, sizeof(dftbase), "%s/dictate", ast_config_AST_SPOOL_DIR);
if (!ast_strlen_zero(data)) {
- parse = ast_strdupa(data);
- if (!parse) {
- ast_log(LOG_ERROR, "Out of memory!\n");
+ if (!(parse = ast_strdupa(data)))
return -1;
- }
AST_STANDARD_APP_ARGS(args, parse);
} else
args.argc = 0;
Modified: trunk/apps/app_directory.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_directory.c?rev=8403&r1=8402&r2=8403&view=diff
==============================================================================
--- trunk/apps/app_directory.c (original)
+++ trunk/apps/app_directory.c Sat Jan 21 14:57:06 2006
@@ -431,10 +431,7 @@
LOCAL_USER_ADD(u);
- parse = ast_strdupa(data);
-
- if (!parse) {
- ast_log(LOG_ERROR, "Out of memory!\n");
+ if (!(parse = ast_strdupa(data))) {
LOCAL_USER_REMOVE(u);
return -1;
}
Modified: trunk/apps/app_disa.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_disa.c?rev=8403&r1=8402&r2=8403&view=diff
==============================================================================
--- trunk/apps/app_disa.c (original)
+++ trunk/apps/app_disa.c Sat Jan 21 14:57:06 2006
@@ -161,9 +161,7 @@
ast_log(LOG_DEBUG, "Digittimeout: %d\n", digittimeout);
ast_log(LOG_DEBUG, "Responsetimeout: %d\n", firstdigittimeout);
- tmp = ast_strdupa(data);
- if (!tmp) {
- ast_log(LOG_ERROR, "Out of memory\n");
+ if (!(tmp = ast_strdupa(data))) {
LOCAL_USER_REMOVE(u);
return -1;
}
Modified: trunk/apps/app_exec.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_exec.c?rev=8403&r1=8402&r2=8403&view=diff
==============================================================================
--- trunk/apps/app_exec.c (original)
+++ trunk/apps/app_exec.c Sat Jan 21 14:57:06 2006
@@ -73,8 +73,7 @@
/* Check and parse arguments */
if (data) {
- s = ast_strdupa((char *)data);
- if (s) {
+ if ((s = ast_strdupa(data))) {
appname = strsep(&s, "(");
if (s) {
endargs = strrchr(s, ')');
@@ -91,10 +90,8 @@
res = -1;
}
}
- } else {
- ast_log(LOG_ERROR, "Out of memory\n");
+ } else
res = -1;
- }
}
LOCAL_USER_REMOVE(u);
Modified: trunk/apps/app_externalivr.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_externalivr.c?rev=8403&r1=8402&r2=8403&view=diff
==============================================================================
--- trunk/apps/app_externalivr.c (original)
+++ trunk/apps/app_externalivr.c Sat Jan 21 14:57:06 2006
@@ -271,9 +271,7 @@
goto exit;
}
- buf = ast_strdupa(data);
- if (!buf) {
- ast_log(LOG_ERROR, "Out of memory!\n");
+ if (!(buf = ast_strdupa(data))) {
LOCAL_USER_REMOVE(u);
return -1;
}
Modified: trunk/apps/app_festival.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_festival.c?rev=8403&r1=8402&r2=8403&view=diff
==============================================================================
--- trunk/apps/app_festival.c (original)
+++ trunk/apps/app_festival.c Sat Jan 21 14:57:06 2006
@@ -339,9 +339,7 @@
festivalcommand = "(tts_textasterisk \"%s\" 'file)(quit)\n";
}
- data = ast_strdupa(vdata);
- if (!data) {
- ast_log(LOG_ERROR, "Out of memery\n");
+ if (!(data = ast_strdupa(vdata))) {
ast_config_destroy(cfg);
LOCAL_USER_REMOVE(u);
return -1;
Modified: trunk/apps/app_hasnewvoicemail.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_hasnewvoicemail.c?rev=8403&r1=8402&r2=8403&view=diff
==============================================================================
--- trunk/apps/app_hasnewvoicemail.c (original)
+++ trunk/apps/app_hasnewvoicemail.c Sat Jan 21 14:57:06 2006
@@ -129,9 +129,7 @@
LOCAL_USER_ADD(u);
- input = ast_strdupa((char *)data);
- if (! input) {
- ast_log(LOG_ERROR, "Out of memory error\n");
+ if (!(input = ast_strdupa(data))) {
LOCAL_USER_REMOVE(u);
return -1;
}
@@ -193,9 +191,7 @@
buf[0] = '\0';
- argsstr = ast_strdupa(data);
- if (!argsstr) {
- ast_log(LOG_ERROR, "Out of memory");
+ if (!(argsstr = ast_strdupa(data))) {
LOCAL_USER_REMOVE(u);
return buf;
}
Modified: trunk/apps/app_image.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_image.c?rev=8403&r1=8402&r2=8403&view=diff
==============================================================================
--- trunk/apps/app_image.c (original)
+++ trunk/apps/app_image.c Sat Jan 21 14:57:06 2006
@@ -79,7 +79,6 @@
LOCAL_USER_ADD(u);
if (!(parse = ast_strdupa(data))) {
- ast_log(LOG_WARNING, "Memory Error!\n");
LOCAL_USER_REMOVE(u);
return -1;
}
Modified: trunk/apps/app_macro.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_macro.c?rev=8403&r1=8402&r2=8403&view=diff
==============================================================================
--- trunk/apps/app_macro.c (original)
+++ trunk/apps/app_macro.c Sat Jan 21 14:57:06 2006
@@ -307,9 +307,7 @@
LOCAL_USER_ADD(u);
- expr = ast_strdupa(data);
- if (!expr) {
- ast_log(LOG_ERROR, "Out of Memory!\n");
+ if (!(expr = ast_strdupa(data))) {
LOCAL_USER_REMOVE(u);
return -1;
}
Modified: trunk/apps/app_meetme.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_meetme.c?rev=8403&r1=8402&r2=8403&view=diff
==============================================================================
--- trunk/apps/app_meetme.c (original)
+++ trunk/apps/app_meetme.c Sat Jan 21 14:57:06 2006
@@ -1778,11 +1778,8 @@
if (strcasecmp(var->name, "conf"))
continue;
- parse = ast_strdupa(var->value);
- if (!parse) {
- ast_log(LOG_ERROR, "Out of Memory!\n");
+ if (!(parse = ast_strdupa(var->value)))
return NULL;
- }
AST_STANDARD_APP_ARGS(args, parse);
if (!strcasecmp(args.confno, confno)) {
@@ -1838,9 +1835,7 @@
LOCAL_USER_ADD(u);
- localdata = ast_strdupa(data);
- if (!localdata) {
- ast_log(LOG_ERROR, "Out of memory!\n");
+ if (!(localdata = ast_strdupa(data))) {
LOCAL_USER_REMOVE(u);
return -1;
}
@@ -1987,8 +1982,6 @@
}
}
}
- } else {
- ast_log(LOG_ERROR, "Out of memory\n");
}
}
var = var->next;
Modified: trunk/apps/app_mixmonitor.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_mixmonitor.c?rev=8403&r1=8402&r2=8403&view=diff
==============================================================================
--- trunk/apps/app_mixmonitor.c (original)
+++ trunk/apps/app_mixmonitor.c Sat Jan 21 14:57:06 2006
@@ -334,7 +334,6 @@
LOCAL_USER_ADD(u);
if (!(parse = ast_strdupa(data))) {
- ast_log(LOG_WARNING, "Memory Error!\n");
LOCAL_USER_REMOVE(u);
return -1;
}
Modified: trunk/apps/app_osplookup.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_osplookup.c?rev=8403&r1=8402&r2=8403&view=diff
==============================================================================
--- trunk/apps/app_osplookup.c (original)
+++ trunk/apps/app_osplookup.c Sat Jan 21 14:57:06 2006
@@ -138,9 +138,7 @@
LOCAL_USER_ADD(u);
- temp = ast_strdupa(data);
- if (!temp) {
- ast_log(LOG_ERROR, "Out of memory!\n");
+ if (!(temp = ast_strdupa(data))) {
LOCAL_USER_REMOVE(u);
return -1;
}
@@ -201,9 +199,7 @@
LOCAL_USER_ADD(u);
- temp = ast_strdupa(data);
- if (!temp) {
- ast_log(LOG_ERROR, "Out of memory!\n");
+ if (!(temp = ast_strdupa(data))) {
LOCAL_USER_REMOVE(u);
return -1;
}
@@ -275,9 +271,7 @@
LOCAL_USER_ADD(u);
- temp = ast_strdupa(data);
- if (!temp) {
- ast_log(LOG_ERROR, "Out of memory!\n");
+ if (!(temp = ast_strdupa(data))) {
LOCAL_USER_REMOVE(u);
return -1;
}
Modified: trunk/apps/app_page.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_page.c?rev=8403&r1=8402&r2=8403&view=diff
==============================================================================
--- trunk/apps/app_page.c (original)
+++ trunk/apps/app_page.c Sat Jan 21 14:57:06 2006
@@ -163,9 +163,7 @@
return -1;
};
- options = ast_strdupa(data);
- if (!options) {
- ast_log(LOG_ERROR, "Out of memory\n");
+ if (!(options = ast_strdupa(data))) {
LOCAL_USER_REMOVE(u);
return -1;
}
Modified: trunk/apps/app_playback.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_playback.c?rev=8403&r1=8402&r2=8403&view=diff
==============================================================================
--- trunk/apps/app_playback.c (original)
+++ trunk/apps/app_playback.c Sat Jan 21 14:57:06 2006
@@ -89,11 +89,8 @@
return -1;
}
- tmp = ast_strdupa(data);
- if (!tmp) {
- ast_log(LOG_ERROR, "Out of memory!\n");
+ if (!(tmp = ast_strdupa(data)))
return -1;
- }
LOCAL_USER_ADD(u);
AST_STANDARD_APP_ARGS(args, tmp);
Modified: trunk/apps/app_privacy.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_privacy.c?rev=8403&r1=8402&r2=8403&view=diff
==============================================================================
--- trunk/apps/app_privacy.c (original)
+++ trunk/apps/app_privacy.c Sat Jan 21 14:57:06 2006
@@ -117,9 +117,7 @@
if (!ast_strlen_zero((char *)data))
{
- parse = ast_strdupa(data);
- if (!parse) {
- ast_log(LOG_ERROR, "Out of memory!\n");
+ if (!(parse = ast_strdupa(data))) {
LOCAL_USER_REMOVE(u);
return -1;
}
Modified: trunk/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_queue.c?rev=8403&r1=8402&r2=8403&view=diff
==============================================================================
--- trunk/apps/app_queue.c (original)
+++ trunk/apps/app_queue.c Sat Jan 21 14:57:06 2006
@@ -2671,7 +2671,6 @@
LOCAL_USER_ADD(u);
if (!(parse = ast_strdupa(data))) {
- ast_log(LOG_WARNING, "Memory Error!\n");
LOCAL_USER_REMOVE(u);
return -1;
}
@@ -2727,7 +2726,6 @@
LOCAL_USER_ADD(u);
if (!(parse = ast_strdupa(data))) {
- ast_log(LOG_WARNING, "Memory Error!\n");
LOCAL_USER_REMOVE(u);
return -1;
}
@@ -2785,7 +2783,6 @@
LOCAL_USER_ADD(u);
if (!(parse = ast_strdupa(data))) {
- ast_log(LOG_WARNING, "Memory Error!\n");
LOCAL_USER_REMOVE(u);
return -1;
}
Modified: trunk/apps/app_random.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_random.c?rev=8403&r1=8402&r2=8403&view=diff
==============================================================================
--- trunk/apps/app_random.c (original)
+++ trunk/apps/app_random.c Sat Jan 21 14:57:06 2006
@@ -73,9 +73,7 @@
LOCAL_USER_ADD(u);
- s = ast_strdupa(data);
- if (!s) {
- ast_log(LOG_ERROR, "Out of memory!\n");
+ if (!(s = ast_strdupa(data))) {
LOCAL_USER_REMOVE(u);
return -1;
}
Modified: trunk/apps/app_read.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_read.c?rev=8403&r1=8402&r2=8403&view=diff
==============================================================================
--- trunk/apps/app_read.c (original)
+++ trunk/apps/app_read.c Sat Jan 21 14:57:06 2006
@@ -117,9 +117,7 @@
LOCAL_USER_ADD(u);
- argcopy = ast_strdupa(data);
- if (!argcopy) {
- ast_log(LOG_ERROR, "Out of memory!\n");
+ if (!(argcopy = ast_strdupa(data))) {
LOCAL_USER_REMOVE(u);
return -1;
}
Modified: trunk/apps/app_readfile.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_readfile.c?rev=8403&r1=8402&r2=8403&view=diff
==============================================================================
--- trunk/apps/app_readfile.c (original)
+++ trunk/apps/app_readfile.c Sat Jan 21 14:57:06 2006
@@ -73,9 +73,7 @@
LOCAL_USER_ADD(u);
- s = ast_strdupa(data);
- if (!s) {
- ast_log(LOG_ERROR, "Out of memory\n");
+ if (!(s = ast_strdupa(data))) {
LOCAL_USER_REMOVE(u);
return -1;
}
Modified: trunk/apps/app_record.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_record.c?rev=8403&r1=8402&r2=8403&view=diff
==============================================================================
--- trunk/apps/app_record.c (original)
+++ trunk/apps/app_record.c Sat Jan 21 14:57:06 2006
@@ -116,9 +116,7 @@
LOCAL_USER_ADD(u);
/* Yay for strsep being easy */
- vdata = ast_strdupa(data);
- if (!vdata) {
- ast_log(LOG_ERROR, "Out of memory\n");
+ if (!(vdata = ast_strdupa(data))) {
LOCAL_USER_REMOVE(u);
return -1;
}
Modified: trunk/apps/app_sayunixtime.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_sayunixtime.c?rev=8403&r1=8402&r2=8403&view=diff
==============================================================================
--- trunk/apps/app_sayunixtime.c (original)
+++ trunk/apps/app_sayunixtime.c Sat Jan 21 14:57:06 2006
@@ -93,8 +93,7 @@
if (data) {
s = data;
- s = ast_strdupa(s);
- if (s) {
+ if ((s = ast_strdupa(s))) {
timec = strsep(&s,"|");
if ((timec) && (*timec != '\0')) {
long timein;
@@ -110,8 +109,6 @@
format = s;
}
}
- } else {
- ast_log(LOG_ERROR, "Out of memory error\n");
}
}
Modified: trunk/apps/app_senddtmf.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_senddtmf.c?rev=8403&r1=8402&r2=8403&view=diff
==============================================================================
--- trunk/apps/app_senddtmf.c (original)
+++ trunk/apps/app_senddtmf.c Sat Jan 21 14:57:06 2006
@@ -74,9 +74,7 @@
LOCAL_USER_ADD(u);
- digits = ast_strdupa(data);
- if (!digits) {
- ast_log(LOG_ERROR, "Out of Memory!\n");
+ if (!(digits = ast_strdupa(data))) {
LOCAL_USER_REMOVE(u);
return -1;
}
Modified: trunk/apps/app_sendtext.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_sendtext.c?rev=8403&r1=8402&r2=8403&view=diff
==============================================================================
--- trunk/apps/app_sendtext.c (original)
+++ trunk/apps/app_sendtext.c Sat Jan 21 14:57:06 2006
@@ -88,9 +88,7 @@
LOCAL_USER_REMOVE(u);
return -1;
} else {
- parse = ast_strdupa(data);
- if (!parse) {
- ast_log(LOG_ERROR, "Out of memory!\n");
+ if (!(parse = ast_strdupa(data))) {
LOCAL_USER_REMOVE(u);
return -1;
}
Modified: trunk/apps/app_setcallerid.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_setcallerid.c?rev=8403&r1=8402&r2=8403&view=diff
==============================================================================
--- trunk/apps/app_setcallerid.c (original)
+++ trunk/apps/app_setcallerid.c Sat Jan 21 14:57:06 2006
@@ -117,9 +117,7 @@
LOCAL_USER_ADD(u);
- tmp = ast_strdupa(data);
- if (!tmp) {
- ast_log(LOG_ERROR, "Out of memory\n");
+ if (!(tmp = ast_strdupa(data))) {
LOCAL_USER_REMOVE(u);
return -1;
}
Modified: trunk/apps/app_skel.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_skel.c?rev=8403&r1=8402&r2=8403&view=diff
==============================================================================
--- trunk/apps/app_skel.c (original)
+++ trunk/apps/app_skel.c Sat Jan 21 14:57:06 2006
@@ -87,9 +87,7 @@
/* Do our thing here */
/* We need to make a copy of the input string if we are going to modify it! */
- args = ast_strdupa(data);
- if (!args) {
- ast_log(LOG_ERROR, "Out of memory!\n");
+ if (!(args = ast_strdupa(data))) {
LOCAL_USER_REMOVE(u);
return -1;
}
Modified: trunk/apps/app_stack.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_stack.c?rev=8403&r1=8402&r2=8403&view=diff
==============================================================================
--- trunk/apps/app_stack.c (original)
+++ trunk/apps/app_stack.c Sat Jan 21 14:57:06 2006
@@ -129,11 +129,8 @@
return 0;
}
- args = ast_strdupa((char *)data);
- if (!args) {
- ast_log(LOG_ERROR, "Out of memory\n");
+ if (!(args = ast_strdupa(data)))
return -1;
- }
LOCAL_USER_ADD(u);
Modified: trunk/apps/app_talkdetect.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_talkdetect.c?rev=8403&r1=8402&r2=8403&view=diff
==============================================================================
--- trunk/apps/app_talkdetect.c (original)
+++ trunk/apps/app_talkdetect.c Sat Jan 21 14:57:06 2006
@@ -88,9 +88,7 @@
LOCAL_USER_ADD(u);
- tmp = ast_strdupa(data);
- if (!tmp) {
- ast_log(LOG_ERROR, "Out of memory\n");
+ if (!(tmp = ast_strdupa(data))) {
LOCAL_USER_REMOVE(u);
return -1;
}
Modified: trunk/apps/app_transfer.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_transfer.c?rev=8403&r1=8402&r2=8403&view=diff
==============================================================================
--- trunk/apps/app_transfer.c (original)
+++ trunk/apps/app_transfer.c Sat Jan 21 14:57:06 2006
@@ -94,9 +94,7 @@
pbx_builtin_setvar_helper(chan, "TRANSFERSTATUS", "FAILURE");
return 0;
} else {
- parse = ast_strdupa(data);
- if (!parse) {
- ast_log(LOG_ERROR, "Out of memory!\n");
+ if (!(parse = ast_strdupa(data))) {
LOCAL_USER_REMOVE(u);
return -1;
}
Modified: trunk/apps/app_url.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_url.c?rev=8403&r1=8402&r2=8403&view=diff
==============================================================================
--- trunk/apps/app_url.c (original)
+++ trunk/apps/app_url.c Sat Jan 21 14:57:06 2006
@@ -94,9 +94,7 @@
LOCAL_USER_ADD(u);
- tmp = ast_strdupa(data);
- if (!tmp) {
- ast_log(LOG_ERROR, "Out of memory\n");
+ if (!(tmp = ast_strdupa(data))) {
LOCAL_USER_REMOVE(u);
return -1;
}
Modified: trunk/apps/app_userevent.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_userevent.c?rev=8403&r1=8402&r2=8403&view=diff
==============================================================================
--- trunk/apps/app_userevent.c (original)
+++ trunk/apps/app_userevent.c Sat Jan 21 14:57:06 2006
@@ -74,9 +74,7 @@
LOCAL_USER_ADD(u);
- info = ast_strdupa(data);
- if (!info) {
- ast_log(LOG_ERROR, "Out of memory\n");
+ if (!(info = ast_strdupa(data))) {
LOCAL_USER_REMOVE(u);
return -1;
}
Modified: trunk/apps/app_verbose.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_verbose.c?rev=8403&r1=8402&r2=8403&view=diff
==============================================================================
--- trunk/apps/app_verbose.c (original)
+++ trunk/apps/app_verbose.c Sat Jan 21 14:57:06 2006
@@ -67,8 +67,7 @@
LOCAL_USER_ADD(u);
if (data) {
- vtext = ast_strdupa((char *)data);
- if (vtext) {
+ if ((vtext = ast_strdupa(data))) {
char *tmp = strsep(&vtext, "|,");
if (vtext) {
if (sscanf(tmp, "%d", &vsize) != 1) {
@@ -97,8 +96,6 @@
ast_verbose(VERBOSE_PREFIX_4 "%s\n", vtext);
}
}
- } else {
- ast_log(LOG_ERROR, "Out of memory\n");
}
}
@@ -120,9 +117,7 @@
return 0;
}
- ltext = ast_strdupa(data);
- if (!ltext) {
- ast_log(LOG_ERROR, "Out of memory\n");
+ if (!(ltext = ast_strdupa(data))) {
LOCAL_USER_REMOVE(u);
return 0;
}
Modified: trunk/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_voicemail.c?rev=8403&r1=8402&r2=8403&view=diff
==============================================================================
--- trunk/apps/app_voicemail.c (original)
+++ trunk/apps/app_voicemail.c Sat Jan 21 14:57:06 2006
@@ -3284,8 +3284,7 @@
snprintf(ext_context, sizeof(ext_context), "%s@%s", vmu->mailbox, vmu->context);
/* Attach only the first format */
- fmt = ast_strdupa(fmt);
- if (fmt) {
+ if ((fmt = ast_strdupa(fmt))) {
stringp = fmt;
strsep(&stringp, "|");
@@ -3304,8 +3303,6 @@
myserveremail = vmu->serveremail;
sendpage(myserveremail, vmu->pager, msgnum, vmu->context, vmu->mailbox, cidnum, cidname, duration, vmu, category);
}
- } else {
- ast_log(LOG_ERROR, "Out of memory\n");
}
if (ast_test_flag(vmu, VM_DELETE)) {
@@ -5057,9 +5054,7 @@
AST_APP_ARG(argv1);
);
- parse = ast_strdupa(data);
- if (!parse) {
- ast_log(LOG_ERROR, "Out of memory!\n");
+ if (!(parse = ast_strdupa(data))) {
LOCAL_USER_REMOVE(u);
return -1;
}
@@ -5647,9 +5642,7 @@
LOCAL_USER_ADD(u);
- box = ast_strdupa(data);
- if (!box) {
- ast_log(LOG_ERROR, "Out of memory\n");
+ if (!(box = ast_strdupa(data))) {
LOCAL_USER_REMOVE(u);
return -1;
}
@@ -5689,11 +5682,8 @@
LOCAL_USER_ADD(u);
if (s) {
- s = ast_strdupa(s);
- if (!s) {
- ast_log(LOG_ERROR, "Out of memory\n");
+ if (!(s = ast_strdupa(s)))
return -1;
- }
user = strsep(&s, "|");
options = strsep(&s, "|");
if (user) {
@@ -6139,8 +6129,7 @@
struct vm_zone *z;
if ((z = ast_malloc(sizeof(*z)))) {
char *msg_format, *timezone;
- msg_format = ast_strdupa(var->value);
- if (msg_format != NULL) {
+ if ((msg_format = ast_strdupa(var->value))) {
timezone = strsep(&msg_format, "|");
if (msg_format) {
ast_copy_string(z->name, var->name, sizeof(z->name));
@@ -6159,7 +6148,6 @@
free(z);
}
} else {
- ast_log(LOG_WARNING, "Out of memory while reading voicemail config\n");
free(z);
return -1;
}
Modified: trunk/apps/app_while.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_while.c?rev=8403&r1=8402&r2=8403&view=diff
==============================================================================
--- trunk/apps/app_while.c (original)
+++ trunk/apps/app_while.c Sat Jan 21 14:57:06 2006
@@ -89,9 +89,7 @@
LOCAL_USER_ADD(u);
- expr = ast_strdupa(data);
- if (!expr) {
- ast_log(LOG_ERROR, "Out of memory\n");
+ if (!(expr = ast_strdupa(data))) {
LOCAL_USER_REMOVE(u);
return -1;
}
Modified: trunk/apps/app_zapras.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_zapras.c?rev=8403&r1=8402&r2=8403&view=diff
==============================================================================
--- trunk/apps/app_zapras.c (original)
+++ trunk/apps/app_zapras.c Sat Jan 21 14:57:06 2006
@@ -209,9 +209,7 @@
LOCAL_USER_ADD(u);
- args = ast_strdupa(data);
- if (!args) {
- ast_log(LOG_ERROR, "Out of memory\n");
+ if (!(args = ast_strdupa(data))) {
LOCAL_USER_REMOVE(u);
return -1;
}
Modified: trunk/channel.c
URL: http://svn.digium.com/view/asterisk/trunk/channel.c?rev=8403&r1=8402&r2=8403&view=diff
==============================================================================
--- trunk/channel.c (original)
+++ trunk/channel.c Sat Jan 21 14:57:06 2006
@@ -3705,12 +3705,9 @@
int start=0, finish=0, x;
ast_group_t group = 0;
- copy = ast_strdupa(s);
- if (!copy) {
- ast_log(LOG_ERROR, "Out of memory\n");
+ c = copy = ast_strdupa(s);
+ if (!copy)
return 0;
- }
- c = copy;
while ((piece = strsep(&c, ","))) {
if (sscanf(piece, "%d-%d", &start, &finish) == 2) {
Modified: trunk/channels/chan_agent.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_agent.c?rev=8403&r1=8402&r2=8403&view=diff
==============================================================================
--- trunk/channels/chan_agent.c (original)
+++ trunk/channels/chan_agent.c Sat Jan 21 14:57:06 2006
@@ -328,11 +328,8 @@
char *agt = NULL;
struct agent_pvt *p, *prev;
- parse = ast_strdupa(agent);
- if (!parse) {
- ast_log(LOG_ERROR, "Out of memory!\n");
+ if (!(parse = ast_strdupa(agent)))
return NULL;
- }
/* Extract username (agt), password and name from agent (args). */
AST_NONSTANDARD_APP_ARGS(args, parse, ',');
@@ -1768,7 +1765,6 @@
LOCAL_USER_ADD(u);
if (!(parse = ast_strdupa(data))) {
- ast_log(LOG_ERROR, "Out of memory!\n");
LOCAL_USER_REMOVE(u);
return -1;
}
@@ -2510,11 +2506,8 @@
return buf;
}
- item = ast_strdupa(data);
- if (!item) {
- ast_log(LOG_ERROR, "Out of memory!\n");
+ if (!(item = ast_strdupa(data)))
return buf;
- }
agentid = strsep(&item, ":");
if (!item)
Modified: trunk/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_iax2.c?rev=8403&r1=8402&r2=8403&view=diff
==============================================================================
--- trunk/channels/chan_iax2.c (original)
+++ trunk/channels/chan_iax2.c Sat Jan 21 14:57:06 2006
@@ -8033,11 +8033,8 @@
char *addr;
char *portstr;
- tmp = ast_strdupa(srcaddr);
- if (!tmp) {
- ast_log(LOG_WARNING, "Out of memory!\n");
+ if (!(tmp = ast_strdupa(srcaddr)))
return -1;
- }
addr = strsep(&tmp, ":");
portstr = tmp;
@@ -9174,10 +9171,8 @@
char *peername, *colname;
char iabuf[INET_ADDRSTRLEN];
- if (!(peername = ast_strdupa(data))) {
- ast_log(LOG_ERROR, "Memory Error!\n");
+ if (!(peername = ast_strdupa(data)))
return ret;
- }
/* if our channel, return the IP address of the endpoint of current channel */
if (!strcmp(peername,"CURRENTCHANNEL")) {
Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?rev=8403&r1=8402&r2=8403&view=diff
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Sat Jan 21 14:57:06 2006
@@ -9292,10 +9292,8 @@
char *peername, *colname;
char iabuf[INET_ADDRSTRLEN];
- if (!(peername = ast_strdupa(data))) {
- ast_log(LOG_ERROR, "Memory Error!\n");
+ if (!(peername = ast_strdupa(data)))
return ret;
- }
if ((colname = strchr(peername, ':'))) {
*colname = '\0';
@@ -12847,11 +12845,9 @@
char *extension, *host, *port;
char tmp[80];
- cdest = ast_strdupa(dest);
- if (!cdest) {
- ast_log(LOG_ERROR, "Problem allocating the memory\n");
+ if (!(cdest = ast_strdupa(dest)))
return 0;
- }
+
extension = strsep(&cdest, "@");
host = strsep(&cdest, ":");
port = strsep(&cdest, ":");
@@ -12879,17 +12875,11 @@
ast_log(LOG_ERROR, "Can't find the host address\n");
return 0;
}
- host = ast_strdupa(lhost);
- if (!host) {
- ast_log(LOG_ERROR, "Problem allocating the memory\n");
+ if (!(host = ast_strdupa(lhost)))
return 0;
- }
if (!ast_strlen_zero(lport)) {
- port = ast_strdupa(lport);
- if (!port) {
- ast_log(LOG_ERROR, "Problem allocating the memory\n");
+ if (!(port = ast_strdupa(lport)))
return 0;
- }
}
}
}
Modified: trunk/funcs/func_cdr.c
URL: http://svn.digium.com/view/asterisk/trunk/funcs/func_cdr.c?rev=8403&r1=8402&r2=8403&view=diff
==============================================================================
--- trunk/funcs/func_cdr.c (original)
+++ trunk/funcs/func_cdr.c Sat Jan 21 14:57:06 2006
@@ -63,11 +63,8 @@
if (!chan->cdr)
return NULL;
- parse = ast_strdupa(data);
- if (!parse) {
- ast_log(LOG_ERROR, "Out of memory!\n");
+ if (!(parse = ast_strdupa(data)))
return NULL;
- }
AST_STANDARD_APP_ARGS(args, parse);
@@ -92,11 +89,8 @@
if (ast_strlen_zero(data) || !value)
return;
- parse = ast_strdupa(data);
- if (!parse) {
- ast_log(LOG_ERROR, "Out of memory!\n");
+ if (!(parse = ast_strdupa(data)))
return;
- }
AST_STANDARD_APP_ARGS(args, parse);
Modified: trunk/funcs/func_cut.c
URL: http://svn.digium.com/view/asterisk/trunk/funcs/func_cut.c?rev=8403&r1=8402&r2=8403&view=diff
==============================================================================
--- trunk/funcs/func_cut.c (original)
+++ trunk/funcs/func_cut.c Sat Jan 21 14:57:06 2006
@@ -83,10 +83,8 @@
return ERROR_NOARG;
}
- strings = ast_strdupa((char *)data);
- if (!strings) {
+ if (!(strings = ast_strdupa(data)))
return ERROR_NOMEM;
- }
for (ptrkey = strings; *ptrkey; ptrkey++) {
if (*ptrkey == '|') {
@@ -142,11 +140,8 @@
memset(buffer, 0, buflen);
- parse = ast_strdupa(data);
- if (!parse) {
- ast_log(LOG_ERROR, "Out of memory!\n");
+ if (!(parse = ast_strdupa(data)))
return ERROR_NOMEM;
- }
AST_STANDARD_APP_ARGS(args, parse);
Modified: trunk/funcs/func_logic.c
URL: http://svn.digium.com/view/asterisk/trunk/funcs/func_logic.c?rev=8403&r1=8402&r2=8403&view=diff
==============================================================================
--- trunk/funcs/func_logic.c (original)
+++ trunk/funcs/func_logic.c Sat Jan 21 14:57:06 2006
@@ -55,10 +55,8 @@
char *iftrue;
char *iffalse;
- if (!(data = ast_strdupa(data))) {
- ast_log(LOG_WARNING, "Memory Error!\n");
+ if (!(data = ast_strdupa(data)))
return NULL;
- }
data = ast_strip_quoted(data, "\"", "\"");
expr = strsep(&data, "?");
@@ -95,10 +93,8 @@
char *iftrue;
char *iffalse;
- if (!(data = ast_strdupa(data))) {
- ast_log(LOG_WARNING, "Memory Error!\n");
+ if (!(data = ast_strdupa(data)))
return NULL;
- }
data = ast_strip_quoted(data, "\"", "\"");
expr = strsep(&data, "?");
@@ -129,10 +125,8 @@
char *varname;
char *val;
- if (!(data = ast_strdupa(data))) {
- ast_log(LOG_WARNING, "Memory Error!\n");
+ if (!(data = ast_strdupa(data)))
return NULL;
- }
varname = strsep(&data, "=");
val = data;
Modified: trunk/funcs/func_math.c
URL: http://svn.digium.com/view/asterisk/trunk/funcs/func_math.c?rev=8403&r1=8402&r2=8403&view=diff
==============================================================================
--- trunk/funcs/func_math.c (original)
+++ trunk/funcs/func_math.c Sat Jan 21 14:57:06 2006
@@ -88,11 +88,8 @@
return NULL;
}
- parse = ast_strdupa(data);
- if(!parse) {
- ast_log(LOG_ERROR, "Out of memory!\n");
- return NULL;
- }
+ if (!(parse = ast_strdupa(data)))
+ return NULL;
AST_STANDARD_APP_ARGS(args, parse);
Modified: trunk/funcs/func_md5.c
URL: http://svn.digium.com/view/asterisk/trunk/funcs/func_md5.c?rev=8403&r1=8402&r2=8403&view=diff
==============================================================================
--- trunk/funcs/func_md5.c (original)
+++ trunk/funcs/func_md5.c Sat Jan 21 14:57:06 2006
@@ -67,11 +67,8 @@
return NULL;
}
- parse = ast_strdupa(data);
- if (!parse) {
- ast_log(LOG_ERROR, "Out of memory!\n");
+ if (!(parse = ast_strdupa(data)))
return NULL;
- }
AST_STANDARD_APP_ARGS(args, parse);
Modified: trunk/funcs/func_odbc.c
URL: http://svn.digium.com/view/asterisk/trunk/funcs/func_odbc.c?rev=8403&r1=8402&r2=8403&view=diff
==============================================================================
--- trunk/funcs/func_odbc.c (original)
+++ trunk/funcs/func_odbc.c Sat Jan 21 14:57:06 2006
@@ -265,9 +265,7 @@
#endif
/* Parse our arguments */
- s = ast_strdupa(data);
- if (!s) {
- ast_log(LOG_ERROR, "Out of memory\n");
+ if (!(s = ast_strdupa(data))) {
ast_mutex_unlock(&query_lock);
return "";
}
Modified: trunk/funcs/func_rand.c
URL: http://svn.digium.com/view/asterisk/trunk/funcs/func_rand.c?rev=8403&r1=8402&r2=8403&view=diff
==============================================================================
--- trunk/funcs/func_rand.c (original)
+++ trunk/funcs/func_rand.c Sat Jan 21 14:57:06 2006
@@ -56,7 +56,6 @@
LOCAL_USER_ACF_ADD(u);
if (!(s = ast_strdupa(data))) {
- ast_log(LOG_WARNING, "Out of memory\n");
*buffer = '\0';
LOCAL_USER_REMOVE(u);
return buffer;
Modified: trunk/funcs/func_strings.c
URL: http://svn.digium.com/view/asterisk/trunk/funcs/func_strings.c?rev=8403&r1=8402&r2=8403&view=diff
==============================================================================
--- trunk/funcs/func_strings.c (original)
+++ trunk/funcs/func_strings.c Sat Jan 21 14:57:06 2006
@@ -51,9 +51,7 @@
AST_APP_ARG(delim);
);
- parse = ast_strdupa(data);
- if (!parse) {
- ast_log(LOG_ERROR, "Out of memory\n");
+ if (!(parse = ast_strdupa(data))) {
ast_copy_string(buf, "0", len);
return buf;
}
@@ -90,11 +88,8 @@
);
char *outbuf=buf;
- parse = ast_strdupa(data);
- if (!parse) {
- ast_log(LOG_ERROR, "Out of memory");
+ if (!(parse = ast_strdupa(data)))
return "";
- }
AST_STANDARD_APP_ARGS(args, parse);
@@ -140,11 +135,8 @@
ast_copy_string(buf, "0", len);
- parse = ast_strdupa(data);
- if (!parse) {
- ast_log(LOG_ERROR, "Out of memory in %s(%s)\n", cmd, data);
- return buf;
- }
+ if (!(parse = ast_strdupa(data)))
+ return buf;
AST_NONSTANDARD_APP_ARGS(args, parse, '"');
@@ -185,10 +177,8 @@
var = ast_strdupa(data);
value2 = ast_strdupa(value);
- if (!var || !value2) {
- ast_log(LOG_ERROR, "Out of memory\n");
+ if (!var || !value2)
return;
- }
/* The functions this will generally be used with are SORT and ODBC_*, which
* both return comma-delimited lists. However, if somebody uses literal lists,
@@ -276,11 +266,8 @@
return buf;
}
- parse = ast_strdupa(data);
- if (!parse) {
- ast_log(LOG_ERROR, "Out of memory\n");
- return buf;
- }
+ if (!(parse = ast_strdupa(data)))
+ return buf;
AST_STANDARD_APP_ARGS(args, parse);
Modified: trunk/pbx.c
URL: http://svn.digium.com/view/asterisk/trunk/pbx.c?rev=8403&r1=8402&r2=8403&view=diff
==============================================================================
--- trunk/pbx.c (original)
+++ trunk/pbx.c Sat Jan 21 14:57:06 2006
@@ -1219,11 +1219,8 @@
char *ret = "0";
struct ast_custom_function *acfptr;
- function = ast_strdupa(in);
- if (!function) {
- ast_log(LOG_ERROR, "Out of memory\n");
+ if (!(function = ast_strdupa(in)))
return ret;
- }
if ((args = strchr(function, '('))) {
*args = '\0';
args++;
@@ -1254,11 +1251,8 @@
char *args = NULL, *function, *p;
struct ast_custom_function *acfptr;
- function = ast_strdupa(in);
- if (!function) {
- ast_log(LOG_ERROR, "Out of memory\n");
+ if (!(function = ast_strdupa(in)))
return;
- }
if ((args = strchr(function, '('))) {
*args = '\0';
args++;
@@ -5145,11 +5139,8 @@
struct ast_flags flags = { 0 };
if (!ast_strlen_zero(data)) {
- args = ast_strdupa(data);
- if (!args) {
- ast_log(LOG_ERROR, "Out of memory!\n");
+ if (!(args = ast_strdupa(data)))
return -1;
- }
ast_app_parse_options(resetcdr_opts, &flags, NULL, args);
}
@@ -5205,8 +5196,6 @@
/* struct ast_include include contained garbage here, fixed by zeroing it on get_timerange */
if (ast_build_timing(&timing, s) && ast_check_timing(&timing))
res = pbx_builtin_goto(chan, (void *)ts);
- } else {
- ast_log(LOG_ERROR, "Memory Error!\n");
}
return res;
}
@@ -5227,12 +5216,8 @@
return -1;
}
- ptr1 = ast_strdupa(data);
-
- if (!ptr1) {
- ast_log(LOG_ERROR, "Out of Memory!\n");
- return -1;
- }
+ if (!(ptr1 = ast_strdupa(data)))
+ return -1;
ptr2 = ptr1;
/* Separate the Application data ptr1 is the time spec ptr2 is the app|data */
More information about the asterisk-commits
mailing list