From 0058b113f7caec31ddce19ac2943c74c2622f1e4 Mon Sep 17 00:00:00 2001 From: ratchov Date: Mon, 6 May 2024 05:37:26 +0000 Subject: [PATCH] sndiod: Ignore server.device settings to a non-working device --- usr.bin/sndiod/dev.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.bin/sndiod/dev.c b/usr.bin/sndiod/dev.c index ec9452d941f..a5fc85e74eb 100644 --- a/usr.bin/sndiod/dev.c +++ b/usr.bin/sndiod/dev.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dev.c,v 1.112 2024/04/22 11:01:02 ratchov Exp $ */ +/* $OpenBSD: dev.c,v 1.113 2024/05/06 05:37:26 ratchov Exp $ */ /* * Copyright (c) 2008-2012 Alexandre Ratchov * @@ -2450,8 +2450,8 @@ ctl_setval(struct ctl *c, int val) c->curval = val; return 1; case CTL_OPT_DEV: - c->u.opt_dev.opt->alt_first = c->u.opt_dev.dev; - opt_setdev(c->u.opt_dev.opt, c->u.opt_dev.dev); + if (opt_setdev(c->u.opt_dev.opt, c->u.opt_dev.dev)) + c->u.opt_dev.opt->alt_first = c->u.opt_dev.dev; return 1; default: if (log_level >= 2) { -- 2.20.1