pa_boolize the client config

git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2009 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
Lennart Poettering 2007-11-01 00:33:14 +00:00
parent 65a6bff357
commit e706f7bed7
2 changed files with 7 additions and 8 deletions

View file

@ -58,10 +58,10 @@ static const pa_client_conf default_conf = {
.default_sink = NULL,
.default_source = NULL,
.default_server = NULL,
.autospawn = 0,
.disable_shm = 0,
.autospawn = FALSE,
.disable_shm = FALSE,
.cookie_file = NULL,
.cookie_valid = 0,
.cookie_valid = FALSE,
};
pa_client_conf *pa_client_conf_new(void) {
@ -172,7 +172,7 @@ int pa_client_conf_env(pa_client_conf *c) {
int pa_client_conf_load_cookie(pa_client_conf* c) {
pa_assert(c);
c->cookie_valid = 0;
c->cookie_valid = FALSE;
if (!c->cookie_file)
return -1;
@ -180,7 +180,6 @@ int pa_client_conf_load_cookie(pa_client_conf* c) {
if (pa_authkey_load_auto(c->cookie_file, c->cookie, sizeof(c->cookie)) < 0)
return -1;
c->cookie_valid = 1;
c->cookie_valid = TRUE;
return 0;
}

View file

@ -30,9 +30,9 @@
typedef struct pa_client_conf {
char *daemon_binary, *extra_arguments, *default_sink, *default_source, *default_server, *cookie_file;
int autospawn, disable_shm;
pa_bool_t autospawn, disable_shm;
uint8_t cookie[PA_NATIVE_COOKIE_LENGTH];
int cookie_valid; /* non-zero, when cookie is valid */
pa_bool_t cookie_valid; /* non-zero, when cookie is valid */
} pa_client_conf;
/* Create a new configuration data object and reset it to defaults */