summaryrefslogtreecommitdiffstats
path: root/src/polypcore/util.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2006-05-14 00:41:18 +0000
committerLennart Poettering <lennart@poettering.net>2006-05-14 00:41:18 +0000
commitbe05b18c6fb6f0e2e2b74ffdf251692a45eaa045 (patch)
tree7974db8d050c3fd6e19dcd3aaa7dde5875f91168 /src/polypcore/util.c
parente46f8f8eb3fd586f8728e43292509434e0e8b089 (diff)
* 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
Diffstat (limited to 'src/polypcore/util.c')
-rw-r--r--src/polypcore/util.c8
1 files changed, 4 insertions, 4 deletions
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 */