]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-11482: [http_cache] set pre_buffer_datalen to 0 on handle (crashfix)
authorDragos Oancea <dragos@signalwire.com>
Fri, 15 Feb 2019 15:35:18 +0000 (10:35 -0500)
committerDragos Oancea <dragos@signalwire.com>
Fri, 15 Feb 2019 15:36:46 +0000 (10:36 -0500)
src/mod/applications/mod_http_cache/mod_http_cache.c

index 84e116ffce1d85f8cd3c2d79bb10917640708b58..21fa078ffab7a16b77a2d5190907a87a7361bfbe 100644 (file)
@@ -1733,6 +1733,7 @@ static switch_status_t http_cache_file_open(switch_file_handle_t *handle, const
                }
        }
 
+       context->fh.pre_buffer_datalen = handle->pre_buffer_datalen;
        if ((status = switch_core_file_open(&context->fh,
                        context->local_path,
                        handle->channels,
@@ -1754,6 +1755,7 @@ static switch_status_t http_cache_file_open(switch_file_handle_t *handle, const
        handle->interval = context->fh.interval;
        handle->channels = context->fh.channels;
        handle->flags |= SWITCH_FILE_NOMUX;
+       handle->pre_buffer_datalen = 0;
 
        if (switch_test_flag((&context->fh), SWITCH_FILE_NATIVE)) {
                switch_set_flag_locked(handle, SWITCH_FILE_NATIVE);