#include "client-conf.h"
-#ifndef DEFAULT_CONFIG_DIR
-# ifndef OS_IS_WIN32
-# define DEFAULT_CONFIG_DIR "/etc/pulse"
-# else
-# define DEFAULT_CONFIG_DIR "%PULSE_ROOT%"
-# endif
-#endif
-
#ifndef OS_IS_WIN32
# define PATH_SEP "/"
#else
# define PATH_SEP "\\"
#endif
-#define DEFAULT_CLIENT_CONFIG_FILE DEFAULT_CONFIG_DIR PATH_SEP "client.conf"
-#define DEFAULT_CLIENT_CONFIG_FILE_USER ".pulse" PATH_SEP "client.conf"
+#define DEFAULT_CLIENT_CONFIG_FILE PA_DEFAULT_CONFIG_DIR PATH_SEP "client.conf"
+#define DEFAULT_CLIENT_CONFIG_FILE_USER "client.conf"
#define ENV_CLIENT_CONFIG_FILE "PULSE_CLIENTCONFIG"
#define ENV_DEFAULT_SINK "PULSE_SINK"
.default_source = NULL,
.default_server = NULL,
.autospawn = 0,
+ .disable_shm = 0,
.cookie_file = NULL,
- .cookie_valid = 0
+ .cookie_valid = 0,
};
pa_client_conf *pa_client_conf_new(void) {
pa_client_conf *c = pa_xmemdup(&default_conf, sizeof(default_conf));
- c->daemon_binary = pa_xstrdup(PULSEAUDIO_BINARY);
+ c->daemon_binary = pa_xstrdup(PA_BINARY);
c->extra_arguments = pa_xstrdup("--log-target=syslog --exit-idle-time=5");
c->cookie_file = pa_xstrdup(PA_NATIVE_COOKIE_FILE);
{ "default-server", pa_config_parse_string, NULL },
{ "autospawn", pa_config_parse_bool, NULL },
{ "cookie-file", pa_config_parse_string, NULL },
+ { "disable-shm", pa_config_parse_bool, NULL },
{ NULL, NULL, NULL },
};
table[4].data = &c->default_server;
table[5].data = &c->autospawn;
table[6].data = &c->cookie_file;
+ table[7].data = &c->disable_shm;
f = filename ?
fopen((fn = pa_xstrdup(filename)), "r") :
pa_open_config_file(DEFAULT_CLIENT_CONFIG_FILE, DEFAULT_CLIENT_CONFIG_FILE_USER, ENV_CLIENT_CONFIG_FILE, &fn, "r");
if (!f && errno != EINTR) {
- pa_log(__FILE__": WARNING: failed to open configuration file '%s': %s", filename, pa_cstrerror(errno));
+ pa_log("WARNING: failed to open configuration file '%s': %s", fn, pa_cstrerror(errno));
goto finish;
}