summaryrefslogtreecommitdiff
path: root/aserver
diff options
context:
space:
mode:
authorAbramo Bagnara <abramo@alsa-project.org>2001-02-07 11:34:33 +0000
committerAbramo Bagnara <abramo@alsa-project.org>2001-02-07 11:34:33 +0000
commit3e091c8822d95b5c67a81cd506c629ef9dba909c (patch)
tree6d62f9da7d7a4753f179e809cd65b39e36e05bab /aserver
parent8f0cb26fdfbd637765ed6ab65b365e43206c99f5 (diff)
Encapsulated conf API
Diffstat (limited to 'aserver')
-rw-r--r--aserver/aserver.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/aserver/aserver.c b/aserver/aserver.c
index 6f879824..5ad6826d 100644
--- a/aserver/aserver.c
+++ b/aserver/aserver.c
@@ -970,34 +970,35 @@ int main(int argc, char **argv)
return 1;
}
snd_config_foreach(i, conf) {
- snd_config_t *n = snd_config_entry(i);
- if (strcmp(n->id, "comment") == 0)
+ snd_config_t *n = snd_config_iterator_entry(i);
+ const char *id = snd_config_get_id(n);
+ if (strcmp(id, "comment") == 0)
continue;
- if (strcmp(n->id, "host") == 0) {
- err = snd_config_string_get(n, &host);
+ if (strcmp(id, "host") == 0) {
+ err = snd_config_get_string(n, &host);
if (err < 0) {
- ERROR("Invalid type for %s", n->id);
+ ERROR("Invalid type for %s", id);
return 1;
}
continue;
}
- if (strcmp(n->id, "socket") == 0) {
- err = snd_config_string_get(n, &socket);
+ if (strcmp(id, "socket") == 0) {
+ err = snd_config_get_string(n, &socket);
if (err < 0) {
- ERROR("Invalid type for %s", n->id);
+ ERROR("Invalid type for %s", id);
return 1;
}
continue;
}
- if (strcmp(n->id, "port") == 0) {
- err = snd_config_integer_get(n, &port);
+ if (strcmp(id, "port") == 0) {
+ err = snd_config_get_integer(n, &port);
if (err < 0) {
- ERROR("Invalid type for %s", n->id);
+ ERROR("Invalid type for %s", id);
return 1;
}
continue;
}
- ERROR("Unknown field %s", n->id);
+ ERROR("Unknown field %s", id);
return 1;
}
if (!host) {