From be05b18c6fb6f0e2e2b74ffdf251692a45eaa045 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sun, 14 May 2006 00:41:18 +0000 Subject: * add new parameter to pa_open_config_file() to specify open mode * modify pa_sink_input_new() to take initial volume settings as argument * call pa_sink_input_set_volume() when changing stream volume in protocol-esound.c to make sure that subscribe events are issued properly git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@858 fefdeb5f-60dc-0310-8127-8f9354f1896f --- src/polypcore/util.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/polypcore/util.c') diff --git a/src/polypcore/util.c b/src/polypcore/util.c index c1f82a20..6f7f8819 100644 --- a/src/polypcore/util.c +++ b/src/polypcore/util.c @@ -1037,7 +1037,7 @@ int pa_unlock_lockfile(const char *fn, int fd) { * file system. If "result" is non-NULL, a pointer to a newly * allocated buffer containing the used configuration file is * stored there.*/ -FILE *pa_open_config_file(const char *global, const char *local, const char *env, char **result) { +FILE *pa_open_config_file(const char *global, const char *local, const char *env, char **result, const char *mode) { const char *fn; char h[PATH_MAX]; @@ -1058,7 +1058,7 @@ FILE *pa_open_config_file(const char *global, const char *local, const char *env if (result) *result = pa_xstrdup(fn); - return fopen(fn, "r"); + return fopen(fn, mode); } if (local && pa_get_home_dir(h, sizeof(h))) { @@ -1073,7 +1073,7 @@ FILE *pa_open_config_file(const char *global, const char *local, const char *env fn = buf; #endif - f = fopen(fn, "r"); + f = fopen(fn, mode); if (f || errno != ENOENT) { if (result) @@ -1101,7 +1101,7 @@ FILE *pa_open_config_file(const char *global, const char *local, const char *env if (result) *result = pa_xstrdup(global); - return fopen(global, "r"); + return fopen(global, mode); } /* Format the specified data as a hexademical string */ -- cgit