* [PATCH] This patch avoids a crash when org.bluez.Manager GetProperties request is
[not found] <20101022131207.GA29655 () jh-x301>
@ 2010-10-23 5:33 ` Tommi Keisala
2010-10-23 5:33 ` [PATCH] This patch avoids a crash when org.bluez.Manager GetProperties request is received and there is not yet any adapters ready. Happens often for example when bluetoothd and ofonod is started next ot each other Tommi Keisala
1 sibling, 0 replies; 3+ messages in thread
From: Tommi Keisala @ 2010-10-23 5:33 UTC (permalink / raw)
To: linux-bluetooth
I made changes requested
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] This patch avoids a crash when org.bluez.Manager GetProperties request is received and there is not yet any adapters ready. Happens often for example when bluetoothd and ofonod is started next ot each other.
[not found] <20101022131207.GA29655 () jh-x301>
2010-10-23 5:33 ` [PATCH] This patch avoids a crash when org.bluez.Manager GetProperties request is Tommi Keisala
@ 2010-10-23 5:33 ` Tommi Keisala
2010-10-23 12:31 ` Johan Hedberg
1 sibling, 1 reply; 3+ messages in thread
From: Tommi Keisala @ 2010-10-23 5:33 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Tommi Keisala
---
src/manager.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/manager.c b/src/manager.c
index aff069c..dd9560f 100644
--- a/src/manager.c
+++ b/src/manager.c
@@ -197,13 +197,14 @@ static DBusMessage *get_properties(DBusConnection *conn,
DBUS_DICT_ENTRY_END_CHAR_AS_STRING, &dict);
array = g_new0(char *, g_slist_length(adapters) + 1);
- for (i = 0, list = adapters; list; list = list->next, i++) {
+ for (i = 0, list = adapters; list; list = list->next) {
struct btd_adapter *adapter = list->data;
if (!adapter_is_ready(adapter))
continue;
array[i] = (char *) adapter_get_path(adapter);
+ i++;
}
dict_append_array(&dict, "Adapters", DBUS_TYPE_OBJECT_PATH, &array, i);
g_free(array);
--
1.7.0.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] This patch avoids a crash when org.bluez.Manager GetProperties request is received and there is not yet any adapters ready. Happens often for example when bluetoothd and ofonod is started next ot each other.
2010-10-23 5:33 ` [PATCH] This patch avoids a crash when org.bluez.Manager GetProperties request is received and there is not yet any adapters ready. Happens often for example when bluetoothd and ofonod is started next ot each other Tommi Keisala
@ 2010-10-23 12:31 ` Johan Hedberg
0 siblings, 0 replies; 3+ messages in thread
From: Johan Hedberg @ 2010-10-23 12:31 UTC (permalink / raw)
To: Tommi Keisala; +Cc: linux-bluetooth
Hi Tommi,
On Sat, Oct 23, 2010, Tommi Keisala wrote:
> ---
> src/manager.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
You seem to have somehow managed to screw up the commit message this
time: everything in the summary line and nothing in the message body.
Anyway, to avoid further feedback rounds (since the patch itself is fine
now) I went ahead and fixed the commit message and pushed your patch
upstream. Thanks.
Johan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-10-23 12:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20101022131207.GA29655 () jh-x301>
2010-10-23 5:33 ` [PATCH] This patch avoids a crash when org.bluez.Manager GetProperties request is Tommi Keisala
2010-10-23 5:33 ` [PATCH] This patch avoids a crash when org.bluez.Manager GetProperties request is received and there is not yet any adapters ready. Happens often for example when bluetoothd and ofonod is started next ot each other Tommi Keisala
2010-10-23 12:31 ` Johan Hedberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox