]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
replaced calloc calls for zap_calloc
authorMoises Silva <moy@sangoma.com>
Sun, 15 Nov 2009 03:35:01 +0000 (03:35 +0000)
committerMoises Silva <moy@sangoma.com>
Sun, 15 Nov 2009 03:35:01 +0000 (03:35 +0000)
git-svn-id: http://svn.openzap.org/svn/openzap/branches/sangoma_boost@863 a93c3328-9c30-0410-af19-c9cd2b2d52af

libs/freetdm/src/libteletone_generate.c
libs/freetdm/src/ozmod/ozmod_sangoma_boost/ozmod_sangoma_boost.c
libs/freetdm/src/zap_io.c
libs/freetdm/src/zap_queue.c

index d0ae2b01e357411e5f619500506829129dc6e3f1..bb41224c9a1da4a76205f52fc74038d0f1afaa27 100644 (file)
@@ -111,7 +111,7 @@ TELETONE_API(int) teletone_init_session(teletone_generation_session_t *ts, int b
        ts->decay_step = 0;
        ts->decay_factor = 1;
        if (buflen) {
-               if ((ts->buffer = calloc(buflen, sizeof(teletone_audio_t))) == 0) {
+               if ((ts->buffer = zap_calloc(buflen, sizeof(teletone_audio_t))) == 0) {
                        return -1;
                }
                ts->datalen = buflen;
index c1f7f74588067c30ea5bb968edbd623404919cc2..5aafbf373485cf88664b1dfcec85a80798ceb916 100644 (file)
@@ -1494,7 +1494,7 @@ static zap_state_map_t boost_state_map = {
 static BOOST_WRITE_MSG_FUNCTION(zap_boost_write_msg)
 {
        zap_sangoma_boost_data_t *sangoma_boost_data = span->signal_data;
-       sangomabc_queue_element_t *element = calloc(1, sizeof(*element));
+       sangomabc_queue_element_t *element = zap_calloc(1, sizeof(*element));
        if (!element) {
                return ZAP_FAIL;
        }
@@ -1588,7 +1588,7 @@ static ZIO_SIG_CONFIGURE_FUNCTION(zap_sangoma_boost_configure_span)
                }
        }
 
-       sangoma_boost_data = calloc(1, sizeof(*sangoma_boost_data));
+       sangoma_boost_data = zap_calloc(1, sizeof(*sangoma_boost_data));
        if (!sangoma_boost_data) {
                FAIL_CONFIG_RETURN(ZAP_FAIL);
        }
index 4a20acf65ff261ab2466067617b573c6a41aa2a1..d0a6aaf69d0f67a7a15cda595a01b82821c5ffcd 100644 (file)
@@ -583,7 +583,7 @@ OZ_DECLARE(zap_status_t) zap_span_add_channel(zap_span_t *span, zap_socket_t soc
                zap_buffer_create(&new_chan->gen_dtmf_buffer, 128, 128, 0);
                new_chan->variable_hash = create_hashtable(16, zap_hash_hashfromstring, zap_hash_equalkeys);
 
-               new_chan->dtmf_hangup_buf = calloc (span->dtmf_hangup_len + 1, sizeof (char));
+               new_chan->dtmf_hangup_buf = zap_calloc (span->dtmf_hangup_len + 1, sizeof (char));
 
                zap_set_flag(new_chan, ZAP_CHANNEL_CONFIGURED | ZAP_CHANNEL_READY);
                *chan = new_chan;
index 93fcd76f1176b5ea1537ae337ec0f62b2259e75a..7392c78117db6dbe06104b121a3a08f37bebf2c8 100644 (file)
@@ -54,12 +54,12 @@ OZ_DECLARE(zap_status_t) zap_queue_create(zap_queue_t **outqueue, zap_size_t siz
        zap_assert(size > 0, ZAP_FAIL, "Queue size is not bigger than 0\n");
 
        *outqueue = NULL;
-       zap_queue_t *queue = calloc(1, sizeof(*queue));
+       zap_queue_t *queue = zap_calloc(1, sizeof(*queue));
        if (!queue) {
                return ZAP_FAIL;
        }
 
-       queue->elements = calloc(1, (sizeof(void*)*size));
+       queue->elements = zap_calloc(1, (sizeof(void*)*size));
        if (!queue->elements) {
                goto failed;
        }