Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1990947ybb; Thu, 9 Apr 2020 12:52:07 -0700 (PDT) X-Google-Smtp-Source: APiQypJVikoXoiIDXd+Lf8yKkT+x735NYd/h5Un0w1vUoCZ08GAbVZ/eDFUoIhK8bvb9F4a00yau X-Received: by 2002:a37:981:: with SMTP id 123mr610861qkj.154.1586461927114; Thu, 09 Apr 2020 12:52:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586461927; cv=none; d=google.com; s=arc-20160816; b=oluQJjyo6rP8Lj/Ya3cuL4tPkDHXllSsw+ifwJQ5SZgGRl2jfkLwh8tnDU0ltkz9Ik xvr2H7HtRV5R8VoelpaaED9S3nbHt6M8GF88hjlUOEwrzeRxKRn4kvASfDWZSZUb1trn JE3Klu5lvR45luhjI4b+9JUaX75ifoY3Sti+95HXeZr6r7hJHuseOjxqN30Fz/J1biV2 Q9rcVtJmxj/gZKdJipPm7OBV2n0CK1X60zhlBwai5SmUTYs6zW+bjnWP3mlw7LfNCnCg HO4lXmfo0y3oALrA2qMXll4k9mTpQ4KPw6ip32Mf5JXOxT3hgr5hwW6G2NY1GoenRpI0 5U0Q== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=bg5r2aE6Owh4lWMBQuidSHBU9dZmz8nf0T5rM6l2dLo=; b=GVz9Gbiu6cWASSLtgCpLyHqTnzoPie9tup47MtMwWNTfruEMTdhCqnnS6b9tyxutd9 3CyuGAckmnd8Z/Utso4CobPrF7PcHvC6jxU56K16ZH88mK8W+6SumfKtWhNEwaKEGKUn v5GWPaLBcYLr33WTuv1mk4OWus+o8YDPHJjpbjyM63tiX24AhZvYMBMCu2YBuAc5C4Ja nyxyE2UNyem9UxG8R2qWz/iBJttfy/dfNYbtoxabTIa/BJQ/spCmlA0EzOeSIbl5Ynwl qIehn33kAqStuPP0kG2UCstQSXXiHvwjTxpgWt+PZyGm9QrDjgM0mVRylEUdlz3KOfnx JJFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@silvair-com.20150623.gappssmtp.com header.s=20150623 header.b=uolOy8Fa; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bx9si6602034qvb.43.2020.04.09.12.51.50; Thu, 09 Apr 2020 12:52:07 -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=@silvair-com.20150623.gappssmtp.com header.s=20150623 header.b=uolOy8Fa; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726992AbgDITro (ORCPT + 99 others); Thu, 9 Apr 2020 15:47:44 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:41218 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726979AbgDITrn (ORCPT ); Thu, 9 Apr 2020 15:47:43 -0400 Received: by mail-lj1-f196.google.com with SMTP id n17so976082lji.8 for ; Thu, 09 Apr 2020 12:47:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=silvair-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=bg5r2aE6Owh4lWMBQuidSHBU9dZmz8nf0T5rM6l2dLo=; b=uolOy8FakFx62tm/bMyKXYeALvKl8tiWRYlxoneVdebkqKa5wItoKQ0sGfhXFyplkW 1AD67AjDqmQR6J8O5Ox1HxvB/7UM05SNOqIezbrjDQv1scfGgBL1RrBNXGQyGaRVgfRh ylYQNBu4jqGA5Jm49MP902uJS1LywC+iVndgVYHSInphFmlISWijKJq7Z6NFgesdB7wP eDad2uIVsmfrxKmUS7ErYIAfu0iAG8c7x8z3oAf/waUeOL+BoZQSMCeDNqy1Wz/hGglS 6iwvPG9iajpyz/ISj5zNsCAy83zGQ4P//plHH61Y4DN5URAMhBtPMm1oqGlbL/SSkHxS Arkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=bg5r2aE6Owh4lWMBQuidSHBU9dZmz8nf0T5rM6l2dLo=; b=RY2eoa7ZeJFDCk9R8OrWDDNiLIjKSa3jCaeJ+Uf4IVfer7jLInUMjRAxTIXn91Y1Pk xF8W1UsRbMAfGScwI4kAuRQ6dLvocdrv+DLb/dg+4PvlC2vX+TUNw0q4ZMV8L6/m/9hY 2trBMVIUYD/m3D6kg5aRjxzY+e38Q/3m7/RpIRlnPBjzWvdIqTgZnpDwMk8xtRgyon2F MFhjbGLsky2sFGC3+Ls7ZN4DS0eKeFA34EXsJ1AuQGPBy7cZt0TVmosp6vUsRzzd2cJE Pt3a5s6ovLMUsNho0iRj1z46FCp+fsGVLF+FqHrq954UI+mMmHm08xQTJD+LaqJsWEva VSaQ== X-Gm-Message-State: AGi0PuZ3+iXyUbu08vCgR/QQwYZufYEDF7EL0fWZmmzs9F8sSE890+bf 6b4FHCtpNoPEyUctzvxkm/nrwOgngbk= X-Received: by 2002:a2e:9a87:: with SMTP id p7mr864312lji.61.1586461661748; Thu, 09 Apr 2020 12:47:41 -0700 (PDT) Received: from kynes.internet.domowy (apn-37-7-76-34.dynamic.gprs.plus.pl. [37.7.76.34]) by smtp.gmail.com with ESMTPSA id l13sm15915895ljc.84.2020.04.09.12.47.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Apr 2020 12:47:41 -0700 (PDT) From: =?UTF-8?q?Micha=C5=82=20Lowas-Rzechonek?= To: linux-bluetooth@vger.kernel.org Cc: =?UTF-8?q?Przemys=C5=82aw=20Fierek?= Subject: [PATCH BlueZ v2 1/4] mesh: Fix invalid app_path on 'Join' Date: Thu, 9 Apr 2020 21:47:30 +0200 Message-Id: <20200409194733.18039-2-michal.lowas-rzechonek@silvair.com> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200409194733.18039-1-michal.lowas-rzechonek@silvair.com> References: <20200409194733.18039-1-michal.lowas-rzechonek@silvair.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org From: Przemysław Fierek This patch fixes invalid app_path on 'Join' method call - the daemon tried to use the value of app_root API argument, while it should use path discovered by scanning result of GetManagedObjects() call. --- mesh/mesh.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/mesh/mesh.c b/mesh/mesh.c index 9b3768b69..a9d5d5dea 100644 --- a/mesh/mesh.c +++ b/mesh/mesh.c @@ -72,7 +72,6 @@ struct join_data{ struct l_dbus_message *msg; struct mesh_agent *agent; char *sender; - const char *app_path; struct mesh_node *node; uint32_t disc_watch; uint8_t *uuid; @@ -445,7 +444,7 @@ static bool prov_complete_cb(void *user_data, uint8_t status, return false; owner = join_pending->sender; - path = join_pending->app_path; + path = node_get_app_path(join_pending->node); if (status == PROV_ERR_SUCCESS && !node_add_pending_local(join_pending->node, info)) @@ -551,7 +550,6 @@ static struct l_dbus_message *join_network_call(struct l_dbus *dbus, join_pending->sender = l_strdup(sender); join_pending->msg = l_dbus_message_ref(msg); - join_pending->app_path = app_path; /* Try to create a temporary node */ node_join(app_path, sender, join_pending->uuid, node_init_cb); -- 2.26.0