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:
Anthony Minessale authored and Andrey Volk committed 2019-07-18 00:26:45 +04:00
1 parent d61a20ce6a
commit 1dd4191601
4 files changed
+52 -23

No files matched your search

+13 -7
View File
@@ -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++;