output/roar: use config_get_block_string() for temporary

This commit is contained in:
Max Kellermann 2011-09-17 20:11:51 +02:00
parent 950772ab8a
commit 567fe89a77

View File

@ -95,14 +95,11 @@ roar_configure(struct roar * self, const struct config_param *param)
{ {
self->host = config_dup_block_string(param, "server", NULL); self->host = config_dup_block_string(param, "server", NULL);
self->name = config_dup_block_string(param, "name", "MPD"); self->name = config_dup_block_string(param, "name", "MPD");
char *role = config_dup_block_string(param, "role", "music");
if (role != NULL) const char *role = config_get_block_string(param, "role", "music");
{ self->role = role != NULL
self->role = roar_str2role(role); ? roar_str2role(role)
g_free(role); : ROAR_ROLE_MUSIC;
}
else
self->role = ROAR_ROLE_MUSIC;
} }
static void * static void *