[pulseaudio-commits] r2477 - /trunk/src/modules/module-volume-restore.c
svnmailer-noreply at 0pointer.de
svnmailer-noreply at 0pointer.de
Wed May 21 15:45:53 PDT 2008
Author: lennart
Date: Thu May 22 00:45:52 2008
New Revision: 2477
URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=2477&root=pulseaudio&view=rev
Log:
move volume restore table from runtime to state dir, fix another compiler warning
Modified:
trunk/src/modules/module-volume-restore.c
Modified: trunk/src/modules/module-volume-restore.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/modules/module-volume-restore.c?rev=2477&root=pulseaudio&r1=2476&r2=2477&view=diff
==============================================================================
--- trunk/src/modules/module-volume-restore.c (original)
+++ trunk/src/modules/module-volume-restore.c Thu May 22 00:45:52 2008
@@ -102,7 +102,7 @@
return NULL;
k = strtol(s, &p, 0);
- if (k <= 0 || k > PA_CHANNELS_MAX)
+ if (k <= 0 || k > (long) PA_CHANNELS_MAX)
return NULL;
v->channels = (unsigned) k;
@@ -488,13 +488,15 @@
u = pa_xnew(struct userdata, 1);
u->core = m->core;
u->hashmap = pa_hashmap_new(pa_idxset_string_hash_func, pa_idxset_string_compare_func);
- u->table_file = pa_runtime_path(pa_modargs_get_value(ma, "table", DEFAULT_VOLUME_TABLE_FILE));
u->modified = FALSE;
u->subscription = NULL;
u->sink_input_new_hook_slot = u->sink_input_fixate_hook_slot = u->source_output_new_hook_slot = NULL;
u->save_time_event = NULL;
m->userdata = u;
+
+ if (!(u->table_file = pa_state_path(pa_modargs_get_value(ma, "table", DEFAULT_VOLUME_TABLE_FILE))))
+ goto fail;
if (pa_modargs_get_value_boolean(ma, "restore_device", &restore_device) < 0 ||
pa_modargs_get_value_boolean(ma, "restore_volume", &restore_volume) < 0) {
More information about the pulseaudio-commits
mailing list