mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-14 06:59:53 -05:00
minor modernizations, increase unload timeout to 60s
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2530 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
ce534976ce
commit
4cf508ec39
1 changed files with 3 additions and 5 deletions
|
|
@ -63,7 +63,7 @@
|
||||||
|
|
||||||
#include "core-scache.h"
|
#include "core-scache.h"
|
||||||
|
|
||||||
#define UNLOAD_POLL_TIME 5
|
#define UNLOAD_POLL_TIME 60
|
||||||
|
|
||||||
static void timeout_callback(pa_mainloop_api *m, pa_time_event*e, PA_GCC_UNUSED const struct timeval *tv, void *userdata) {
|
static void timeout_callback(pa_mainloop_api *m, pa_time_event*e, PA_GCC_UNUSED const struct timeval *tv, void *userdata) {
|
||||||
pa_core *c = userdata;
|
pa_core *c = userdata;
|
||||||
|
|
@ -131,8 +131,7 @@ static pa_scache_entry* scache_add_item(pa_core *c, const char *name) {
|
||||||
}
|
}
|
||||||
|
|
||||||
e->last_used_time = 0;
|
e->last_used_time = 0;
|
||||||
e->memchunk.memblock = NULL;
|
pa_memchunk_reset(&e->memchunk);
|
||||||
e->memchunk.index = e->memchunk.length = 0;
|
|
||||||
e->filename = NULL;
|
e->filename = NULL;
|
||||||
e->lazy = FALSE;
|
e->lazy = FALSE;
|
||||||
e->last_used_time = 0;
|
e->last_used_time = 0;
|
||||||
|
|
@ -277,8 +276,7 @@ int pa_scache_remove_item(pa_core *c, const char *name) {
|
||||||
if (!(e = pa_namereg_get(c, name, PA_NAMEREG_SAMPLE, 0)))
|
if (!(e = pa_namereg_get(c, name, PA_NAMEREG_SAMPLE, 0)))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (pa_idxset_remove_by_data(c->scache, e, NULL) != e)
|
pa_assert_se(pa_idxset_remove_by_data(c->scache, e, NULL) == e);
|
||||||
pa_assert(0);
|
|
||||||
|
|
||||||
pa_log_debug("Removed sample \"%s\"", name);
|
pa_log_debug("Removed sample \"%s\"", name);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue