* [Bluez-devel] Input setup crash fix, and crash bug report
@ 2008-07-06 15:06 Bastien Nocera
0 siblings, 0 replies; only message in thread
From: Bastien Nocera @ 2008-07-06 15:06 UTC (permalink / raw)
To: BlueZ development
[-- 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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-07-06 15:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-06 15:06 [Bluez-devel] Input setup crash fix, and crash bug report Bastien Nocera
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox