Update of /cvsroot/alsa/alsa-utils/alsactl In directory sc8-pr-cvs1:/tmp/cvs-serv3439
Modified Files: alsactl.c Log Message: fixes by Clemens Ladisch <[EMAIL PROTECTED]>: - fixed the check of wrong variable. - suppress the "no state is present..." message if the card has no controls. Index: alsactl.c =================================================================== RCS file: /cvsroot/alsa/alsa-utils/alsactl/alsactl.c,v retrieving revision 1.53 retrieving revision 1.54 diff -u -r1.53 -r1.54 --- alsactl.c 20 Jun 2003 18:09:49 -0000 1.53 +++ alsactl.c 20 Jun 2003 18:13:28 -0000 1.54 @@ -507,7 +507,7 @@ } err = snd_config_search(state, id, &card); if (err == 0 && - snd_config_get_type(state) != SND_CONFIG_TYPE_COMPOUND) { + snd_config_get_type(card) != SND_CONFIG_TYPE_COMPOUND) { error("config state.%s node is not a compound", id); err = -EINVAL; goto _close; @@ -527,18 +527,22 @@ goto _close; } } - err = snd_config_compound_add(card, "control", 1, &control); - if (err < 0) { - error("snd_config_compound_add: %s", snd_strerror(err)); - goto _close; - } err = snd_ctl_elem_list(handle, list); if (err < 0) { error("Cannot determine controls: %s", snd_strerror(err)); goto _close; } count = snd_ctl_elem_list_get_count(list); - if (count <= 0) { + if (count < 0) { + err = 0; + goto _close; + } + err = snd_config_compound_add(card, "control", count > 0, &control); + if (err < 0) { + error("snd_config_compound_add: %s", snd_strerror(err)); + goto _close; + } + if (count == 0) { err = 0; goto _close; } ------------------------------------------------------- This SF.Net email is sponsored by: INetU Attention Web Developers & Consultants: Become An INetU Hosting Partner. Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php _______________________________________________ Alsa-cvslog mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-cvslog