From: Matt Schulte <schultetwin1@gmail.com>
To: linux-bluetooth@vger.kernel.org
Cc: Matt Schulte <schultetwin1@gmail.com>
Subject: [PATCH BlueZ] gdbus: properly init client connected state
Date: Tue, 6 Feb 2018 00:51:51 -0800 [thread overview]
Message-ID: <20180206085151.15515-1-schultetwin1@gmail.com> (raw)
GDBusClient struct's connected member was being initialize to false for
all new clients even if the connection was connected. This changes the
GDBusClient connected field to be initialized from the state of the dbus
connection
---
gdbus/client.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdbus/client.c b/gdbus/client.c
index eaab7d50b..a41ce1a7f 100644
--- a/gdbus/client.c
+++ b/gdbus/client.c
@@ -1316,7 +1316,7 @@ GDBusClient *g_dbus_client_new_full(DBusConnection *connection,
client->service_name = g_strdup(service);
client->base_path = g_strdup(path);
client->root_path = g_strdup(root_path);
- client->connected = FALSE;
+ client->connected = dbus_connection_get_is_connected(connection);
client->match_rules = g_ptr_array_sized_new(1);
g_ptr_array_set_free_func(client->match_rules, g_free);
--
2.16.1
next reply other threads:[~2018-02-06 8:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-06 8:51 Matt Schulte [this message]
2018-02-06 8:59 ` [PATCH BlueZ] gdbus: properly init client connected state Luiz Augusto von Dentz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180206085151.15515-1-schultetwin1@gmail.com \
--to=schultetwin1@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox