Received: by 2002:a05:7208:b08c:b0:82:bbfa:f723 with SMTP id c12csp411779rbb; Fri, 26 Apr 2024 07:48:41 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWzM3GjRjGbEsQr3BKeDVncHT9ofs5bXHiAj4B1k+Cz1W9KrX2dC2rVep8/uv5jfD++s+DnKjrmSnuDNhRNMhSbvjRsiMrJCP6ezEiteA== X-Google-Smtp-Source: AGHT+IFj4HrSYdtZHdfx41mCEa0ZRo4M1MuXfzdYFH7YZiS+LIgrm2X7YLxca1ocOK0ouAPehzR1 X-Received: by 2002:a17:907:25c5:b0:a58:c559:3d06 with SMTP id ae5-20020a17090725c500b00a58c5593d06mr2298415ejc.55.1714142921128; Fri, 26 Apr 2024 07:48:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714142921; cv=pass; d=google.com; s=arc-20160816; b=X7QPdHIIOOYzoRUuYu8RpPP+Sqz8fYXvHGGoKD/4kiXC0mz245dTV/Ck9VA5NrWFVh GEIGUNoMhOa8RUnzJ7kZHnA9NiK7g4UGi2wStlfs7nuaP8DzPAqMA1pfYXzD91ORxvgz 0e9S2gVA1DqoW961CnN8byqOSNiaIgn0yGvj5KzQiAn7NOf7aXmMXClbZdHSgynqIFrh TIdxesknrN/j1wVjUs8E/AuW5mnJF2QQlP/s0ASIJLOtB5CS38fPx0nZHWzb8DlJLwIt PLeRbsZuini9/xVhjDtbs3gdzS+83tia/uG7s14keB78HHLXH9pv0Uaii0R/5Lr/o0WR L82A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:to:from:dkim-signature; bh=4f3ZGAfcnLTcFX35xtIqjhutqvGFiE+LM2NznGXlNn0=; fh=4lGQI6056MBa4/oovMyIYaKLn+Wz/24RGvUivMmQP8E=; b=slSA5vBclp1YOuEJGihv0afY99RgANeLqQOI3xWMo3Sns/FIimmDzSmw8lxUi3btrx BI6Z0cpP7fz2a2rVVJmAVDCH3J24QPxTv1pmr6zd3S/GRxx4JRC4uqMPDTd+1YKPACvx rLlYSQuZt64Evs901SC8w9PAINu3a3PNuRV8lKOeTnDo23ltIQUU41/O/aMCtekCaI3P safqGx9ZjrN+RIAG6VlQBiqV+7/RA2VtkiPvTUsPeiSjXSgqFonKPwXVytxbYiJ///Sa A1qXnupKcZlPp+IMHq84ZY0hVr92vOCQq0Pt9kCCyxS1GhaT+SKVmUPV5j59ee63fkEt gQUQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=XYBRtNLC; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-bluetooth+bounces-4115-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-4115-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id x18-20020a170906711200b00a58db79e245si243195ejj.1037.2024.04.26.07.48.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Apr 2024 07:48:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-4115-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=XYBRtNLC; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-bluetooth+bounces-4115-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-4115-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id DDF8F1F245DB for ; Fri, 26 Apr 2024 14:48:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 63FF914883C; Fri, 26 Apr 2024 14:48:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="XYBRtNLC" X-Original-To: linux-bluetooth@vger.kernel.org Received: from mail-pf1-f178.google.com (mail-pf1-f178.google.com [209.85.210.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8E72B13F43A for ; Fri, 26 Apr 2024 14:48:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714142913; cv=none; b=HoMaf0IBWKa+xuB2VtmQnCA/QtA3/Y9oLF5XdGrt4MtA29nAro7bol6CbEPJTt9QgkmJZTLalsOAgMyLUK2Q4/cxaStdEj8E7tefbTgH7xOp0s5GkkKOrYQ72DnOzMPiUban/NYaYRPn/d2EYUanqkmMkv5D0bu3eGElYuowJwE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714142913; c=relaxed/simple; bh=YWzMb+4eWQz9Tz7k0P2eWRt473A8YnEmKUbp6EMyej0=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=fnIN/Gt5vjNQWttk4h0fz4cW2iXBBnIeQwMbTjRfZlZ31nZIKSsw+amQXAEmR6b6j2BJp2HgW8S0vAmtNOBrTdWRqYxiHK8UnAfs3Ce9zKRWS5/Fgn05mZZcP0jG3mpZpFiwrYLieR6IhNoDDlbFlzjswk0dMI4n7AnXjd9qV08= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=XYBRtNLC; arc=none smtp.client-ip=209.85.210.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pf1-f178.google.com with SMTP id d2e1a72fcca58-6f28bb6d747so2003574b3a.3 for ; Fri, 26 Apr 2024 07:48:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714142911; x=1714747711; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=4f3ZGAfcnLTcFX35xtIqjhutqvGFiE+LM2NznGXlNn0=; b=XYBRtNLC2Mtf/HNK0DGRW+i0GPE0cr0BBiF+5nF6kFGorvJXJTBPDjR7+WIl3AQvhx DNUTatrCHqd2dIKpNMt7o4WuJ577DGA0Dj9Qn8jmTxTdG8RY8Nng1UbKNRMAxq/6NUcd A6oyFwfjWi7FyPaGmGEYbUeGZ8S+zoq9FVQ3m69zFmvrOVbS/5j1q8CEyPVZo42OBc5M mhzRn6M+WoOjXu+i49yEyX9vwfAN8FRpabvWD3qHLtypksYwc9BPBRxrxL0lGvdF4QYX uP1qpsknU11YGHPkKlOLhgpp81gNlmH2jgbND6hEadQO4k1bl7IEEIxb97X5/h0gccDs f9ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714142911; x=1714747711; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4f3ZGAfcnLTcFX35xtIqjhutqvGFiE+LM2NznGXlNn0=; b=bOMBiVLMCcgBDvOuTUQ5kRp99wfm/i+fQrJ5x8dV1PpD4rQGLSAiHlK0nd41Uvs2Kk q7iixImUptWAMXBTwIEtv2H5Dl2MFZHxRxUrbWIAgoyAttIh8rNXb+1TcVAi4dCABsSe NAzgZQy+0DrhuwVTpYq5eyk0hm7kRX4n8s6bm+4OLWpmoVCB4jp9gbWShZRAMeL+dPG4 p1O65VoH/3sCVnH2rZeWcEp4NmMq3K1hI/iIk6BUalYmL0E8MnGI3wbO/rS4lKGgD9QF ubZoBARROadacg3jikpLi8SP1LgF65lsvjAGekij10TUgO8ds4fro+N49NUKKNk4GM4R plRw== X-Gm-Message-State: AOJu0YzTwcNdXEnW1jirl+8fO8jj7T2UAvTWzYxAlf/+nDpcqcdtR9x+ CL4sJsyEaPW2oeRMYcBZjSjqePUoFX27d/9Zbkrk329jvGbRJI0DRNrkMg== X-Received: by 2002:a05:6a00:3a12:b0:6ed:7684:484b with SMTP id fj18-20020a056a003a1200b006ed7684484bmr3045670pfb.27.1714142911042; Fri, 26 Apr 2024 07:48:31 -0700 (PDT) Received: from lvondent-mobl4.. ([107.146.107.67]) by smtp.gmail.com with ESMTPSA id x23-20020a056a00189700b006edadf8058asm14914487pfh.23.2024.04.26.07.48.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Apr 2024 07:48:29 -0700 (PDT) From: Luiz Augusto von Dentz To: linux-bluetooth@vger.kernel.org Subject: [PATCH BlueZ v1 2/2] gatt-database: Implement support to org.bluez.Error.ImproperlyConfigured Date: Fri, 26 Apr 2024 10:48:26 -0400 Message-ID: <20240426144826.2608852-2-luiz.dentz@gmail.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240426144826.2608852-1-luiz.dentz@gmail.com> References: <20240426144826.2608852-1-luiz.dentz@gmail.com> Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Luiz Augusto von Dentz This implements support for handling when applications reply with org.bluez.Error.ImproperlyConfigured the code will translate it to BT_ERROR_CCC_IMPROPERLY_CONFIGURED. Fixes: https://github.com/bluez/bluez/issues/827 --- src/gatt-database.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gatt-database.c b/src/gatt-database.c index 7ca2f94222c6..d028ce012b99 100644 --- a/src/gatt-database.c +++ b/src/gatt-database.c @@ -2248,6 +2248,9 @@ static uint8_t dbus_error_to_att_ecode(const char *name, const char *msg, if (strcmp(name, ERROR_INTERFACE ".InProgress") == 0) return BT_ERROR_ALREADY_IN_PROGRESS; + if (strcmp(name, ERROR_INTERFACE ".ImproperlyConfigured")) + return BT_ERROR_CCC_IMPROPERLY_CONFIGURED; + if (strcmp(name, ERROR_INTERFACE ".NotPermitted") == 0) return perm_err; -- 2.44.0