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;
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;
}
}
}
- 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);
}
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;
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;
}