From: Bastien Nocera <hadess@hadess.net>
To: BlueZ development <bluez-devel@lists.sourceforge.net>
Subject: [Bluez-devel] Input setup crash fix, and crash bug report
Date: Sun, 06 Jul 2008 16:06:18 +0100 [thread overview]
Message-ID: <1215356778.13854.4.camel@snoogens.fab.redhat.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 682 bytes --]
Heya,
Using current CVS of bluez-{libs,utils,gnome}, and trying to pair an
input device will crash.
First, we never check whether the service is running, so the manager is
never set in input.c. The attached patch fixes that.
Later on, we pass garbage to dbus_g_proxy_new_for_name() when the call
to CreateSecureDevice fails. I've added a check for the retval, but it
obviously doesn't fix the problem.
Any ideas why it would say:
** (bluetooth-properties:16409): WARNING **: dbus_g_proxy_end_call()
failed in proxy_callback: Authentication failed (CreateBonding)
I get the pairing prompt on my computer, and it usually crashes when I
have to enter the PIN on my phone.
Cheers
[-- Attachment #2: bluez-gnome-input-no-crash.patch --]
[-- Type: text/x-patch, Size: 1646 bytes --]
Index: input.c
===================================================================
RCS file: /cvsroot/bluez/gnome/properties/input.c,v
retrieving revision 1.13
diff -u -p -r1.13 input.c
--- input.c 2 Feb 2008 04:09:43 -0000 1.13
+++ input.c 6 Jul 2008 15:01:15 -0000
@@ -49,6 +49,7 @@ static GtkWidget *button_remove;
static void proxy_callback(DBusGProxy *proxy,
DBusGProxyCall *call, void *user_data)
{
+ GError *error = NULL;
GtkWidget *notebook = user_data;
GtkWidget *button;
GtkWidget *label;
@@ -59,8 +60,12 @@ static void proxy_callback(DBusGProxy *p
g_object_set_data(G_OBJECT(notebook), "call", NULL);
- dbus_g_proxy_end_call(proxy, call, NULL,
- G_TYPE_STRING, &path, G_TYPE_INVALID);
+ if (dbus_g_proxy_end_call(proxy, call, &error,
+ G_TYPE_STRING, &path, G_TYPE_INVALID) == FALSE) {
+ g_warning ("dbus_g_proxy_end_call() failed in proxy_callback: %s", error->message);
+ g_error_free (error);
+ return;
+ }
button = g_object_get_data(G_OBJECT(notebook), "cancel");
gtk_widget_hide(button);
Index: service.c
===================================================================
RCS file: /cvsroot/bluez/gnome/properties/service.c,v
retrieving revision 1.14
diff -u -p -r1.14 service.c
--- service.c 25 Jun 2008 20:38:06 -0000 1.14
+++ service.c 6 Jul 2008 15:01:15 -0000
@@ -316,6 +316,9 @@ done:
gtk_list_store_insert_with_values(service_store, &service->iter, -1,
COLUMN_PATH, path, COLUMN_IDENT, identifier, -1);
+ dbus_g_proxy_call(object, "IsRunning", NULL, G_TYPE_INVALID,
+ G_TYPE_BOOLEAN, &running, G_TYPE_INVALID);
+
if (running == TRUE)
service_started(object, service);
}
[-- Attachment #3: Type: text/plain, Size: 347 bytes --]
-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
[-- Attachment #4: Type: text/plain, Size: 164 bytes --]
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
reply other threads:[~2008-07-06 15:06 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1215356778.13854.4.camel@snoogens.fab.redhat.com \
--to=hadess@hadess.net \
--cc=bluez-devel@lists.sourceforge.net \
/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