mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-23 12:42:02 +00:00
FS-11896: [core] stop media bugs from being possible to add to channels with no media ready, stop transfer recordings upstream to not try to transfer recordings to channels without media ready
This commit is contained in:
committed by
Andrey Volk
parent
d61a20ce6a
commit
1dd4191601
@@ -57,15 +57,21 @@ FT_DECLARE(ftdm_status_t) ftdm_buffer_create(ftdm_buffer_t **buffer, ftdm_size_t
|
||||
if (new_buffer) {
|
||||
memset(new_buffer, 0, sizeof(*new_buffer));
|
||||
|
||||
if (start_len) {
|
||||
new_buffer->data = ftdm_malloc(start_len);
|
||||
if (!new_buffer->data) {
|
||||
ftdm_safe_free(new_buffer);
|
||||
return FTDM_MEMERR;
|
||||
}
|
||||
memset(new_buffer->data, 0, start_len);
|
||||
if (!start_len) {
|
||||
start_len = 250;
|
||||
}
|
||||
|
||||
if (!block_size) {
|
||||
block_size = start_len;
|
||||
}
|
||||
|
||||
new_buffer->data = ftdm_malloc(start_len);
|
||||
if (!new_buffer->data) {
|
||||
ftdm_safe_free(new_buffer);
|
||||
return FTDM_MEMERR;
|
||||
}
|
||||
memset(new_buffer->data, 0, start_len);
|
||||
|
||||
new_buffer->max_len = max_len;
|
||||
new_buffer->datalen = start_len;
|
||||
new_buffer->id = buffer_id++;
|
||||
|
||||
Reference in New Issue
Block a user