summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell Bryant <russell@russellbryant.com>2006-03-29 04:09:31 +0000
committerRussell Bryant <russell@russellbryant.com>2006-03-29 04:09:31 +0000
commit6601f4deba7a8089570b6921820021610de55230 (patch)
tree9794eb2d0cd1160dc5334d0d03d7a18bc4c1a5ca
parent705ccb221882612b0f1c7b55e5c00ca86ed4c3a9 (diff)
conversion from malloc to ast_malloc
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16006 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r--channels/chan_iax2.c4
-rw-r--r--translate.c7
2 files changed, 5 insertions, 6 deletions
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c
index 409fab52a..265563a52 100644
--- a/channels/chan_iax2.c
+++ b/channels/chan_iax2.c
@@ -103,11 +103,11 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
/* Define SCHED_MULTITHREADED to run the scheduler in a special
multithreaded mode. */
-#define SCHED_MULTITHREADED
+// #define SCHED_MULTITHREADED
/* Define DEBUG_SCHED_MULTITHREADED to keep track of where each
thread is actually doing. */
-#define DEBUG_SCHED_MULTITHREAD
+// #define DEBUG_SCHED_MULTITHREAD
#ifdef NEWJB
#include "../jitterbuf.h"
diff --git a/translate.c b/translate.c
index 1ebbc1ff6..69a2a2b59 100644
--- a/translate.c
+++ b/translate.c
@@ -110,7 +110,7 @@ struct ast_trans_pvt *ast_translator_build_path(int dest, int source)
source = powerof(source);
dest = powerof(dest);
- while(source != dest) {
+ while (source != dest) {
if (!tr_matrix[source][dest].step) {
/* We shouldn't have allocated any memory */
ast_log(LOG_WARNING, "No translator path from %s to %s\n",
@@ -119,13 +119,12 @@ struct ast_trans_pvt *ast_translator_build_path(int dest, int source)
}
if (tmp) {
- tmp->next = malloc(sizeof(*tmp));
+ tmp->next = ast_malloc(sizeof(*tmp));
tmp = tmp->next;
} else
- tmp = malloc(sizeof(*tmp));
+ tmp = ast_malloc(sizeof(*tmp));
if (!tmp) {
- ast_log(LOG_WARNING, "Out of memory\n");
if (tmpr)
ast_translator_free_path(tmpr);
return NULL;