Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp3718219ybb; Mon, 6 Apr 2020 14:19:24 -0700 (PDT) X-Google-Smtp-Source: APiQypJWFh7w+WrpBLYgtjz2Wr5sT6yfDg+B5FnAxa/n12zfGvlo8jfv2Rc+K2PXDbk7uPsqJ7GO X-Received: by 2002:aca:cdcd:: with SMTP id d196mr1077173oig.16.1586207964813; Mon, 06 Apr 2020 14:19:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586207964; cv=none; d=google.com; s=arc-20160816; b=GIocQE7BotaWX0ofnFcFdJquzrMbqbHFrzahSsE1lKoHTIyFHd5ErUgxMetndE+8x2 I91zja1851xjSoxgIxxgtvdlvbAHEjnAONVkKad0L0KcK7cqooWmuMLWYxdiOam9iTUQ OFcyEIStP7lrzI0vM9hlbersVlSHvi1WgpiX2rVrMRq+VxkrM8jaZbtKsnpCycZBoVeZ 6yBE2DBpUnKiubXGdKAFlKrV9SQ3R+4lv7SvM1nLhcpZqBL9ftUzDQwBkOvE9NZHnLjA 7yCObCJyYe478DYReCleChl2ik2oB98UWs4rsWhucmd9hPmhGLINOCd4wvf+XfUJnn7v tlxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:to:from:dkim-signature; bh=5NAn0/PmkUxOYiQc03ztb1Nd2wCHPZRZ8x/VsrVOxPI=; b=awX/9QoZIdyleceHAzpHEeoCaQYz+4wTlXvk5xN1ZFDr7AnZRyyKUFw+ql24n8/Av2 moM8BnqULt4u4RBmFZA5X29paIHcHyVE9EDBraJ9tqXAKjRancQBA5z90bIfqrx5J75l U4bCkV6BKaNYU8MGYbSc0XZb/fyGpLdKhiR+HYi6Rope7q5I5IMseyTYXdAGYJczr/sC qLFG51krZl2x/kWIEfzasFW11ZHvm6gnViQ+sLTV33mPT9OM8Rz02qEvdwKmz+vMO8Gh VlXTEGyVHjKOAcSawmkkOpEtIXnUKlDdpfEhH5kZSZk91yfYTCOIdhY6m6kQb/6PMa56 /Nfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=uIzpkEfN; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w21si388142otp.93.2020.04.06.14.19.10; Mon, 06 Apr 2020 14:19:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=uIzpkEfN; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725933AbgDFVTG (ORCPT + 99 others); Mon, 6 Apr 2020 17:19:06 -0400 Received: from mail-pl1-f175.google.com ([209.85.214.175]:37982 "EHLO mail-pl1-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725895AbgDFVTF (ORCPT ); Mon, 6 Apr 2020 17:19:05 -0400 Received: by mail-pl1-f175.google.com with SMTP id w3so363681plz.5 for ; Mon, 06 Apr 2020 14:19:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=5NAn0/PmkUxOYiQc03ztb1Nd2wCHPZRZ8x/VsrVOxPI=; b=uIzpkEfNuXr3zsnwuQX2rkge3cPgq9L6wcZw9rr264g2HrJ3ooL43n30mf6IHKMOjT dkHR7Y6NZhGAQ/7nsb+YSTle8Rm2xY1ZiQhv87DEGbl/8NsX6QeMxmc330OjEzrCadWd QwQSKVzsVV993YJvThtnkMDPQDcbo+yopLjvtv9UfJmSaCaGUsoeCeQG1tWGHku90r83 5KIErLANPiBBbGd39zmi3RYm9Gg0NSOWqsIDWJbjWzOPKqBeWJiOV8aU3tKmGiNFYn6W 0hfwOhPojYOR7XsZdp1rCuWkX+DfZGX6v0KH/72Muj1/n0XRWr0iwmox/T/YRBWspN0n 6+bA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=5NAn0/PmkUxOYiQc03ztb1Nd2wCHPZRZ8x/VsrVOxPI=; b=FVSQYuFEvO/lhkaIbJX+abz96o48XJDUJhmrr+BzGHbUNdyH7mNF1wPXgrcU/fC3uy f9r36qUYDXe64fls43hhe/Pn9Fcdhv+xXgn+RUs53//palDJNGyIIBoBEgTvR7jw7BVa FlmGpoCnE85i4AZYgKoR+wwSSSbxx9g+p6FJw5JU3ohji/LdkVRbp0eyfrW030auCWEr 7nse3mRjdJZ0hjGsR95W6EUkdpd9AbJkxKT/LmLJqdjo94S36KzZcotaOMqLa/pHD5AU 3KQ81W81sBv+uDtLJoOk01b+Z2oz3oQsnbNLZKoYmalY9wwsb6sRvkhtJ9DcPld/Gwe4 eWaA== X-Gm-Message-State: AGi0PubEnvQL2l92Atsj+6YZdfpWjzouSj1GuZWfqt3oncy37LzZ/cYZ K8zxs9zR+jFe8bEXjevG9mW3NsOaMtM= X-Received: by 2002:a17:90a:25c8:: with SMTP id k66mr1362822pje.90.1586207944706; Mon, 06 Apr 2020 14:19:04 -0700 (PDT) Received: from localhost.localdomain (c-71-56-157-77.hsd1.or.comcast.net. [71.56.157.77]) by smtp.gmail.com with ESMTPSA id x75sm12434585pfc.161.2020.04.06.14.19.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Apr 2020 14:19:04 -0700 (PDT) From: Luiz Augusto von Dentz To: linux-bluetooth@vger.kernel.org Subject: [PATCH BlueZ] gatt: Fix not sending any data when server supports AcquireWrite Date: Mon, 6 Apr 2020 14:19:03 -0700 Message-Id: <20200406211903.12549-1-luiz.dentz@gmail.com> X-Mailer: git-send-email 2.21.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org From: Luiz Augusto von Dentz msg.msg_iovlen should be set to 1 to forward the data received over the file descriptor. --- src/gatt-database.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gatt-database.c b/src/gatt-database.c index 483c84341..db67dd3f8 100644 --- a/src/gatt-database.c +++ b/src/gatt-database.c @@ -2396,6 +2396,7 @@ static int sock_io_send(struct io *io, const void *data, size_t len) memset(&msg, 0, sizeof(msg)); msg.msg_iov = &iov; + msg.msg_iovlen = 1; return sendmsg(io_get_fd(io), &msg, MSG_NOSIGNAL); } -- 2.21.1