Summary: | kbluetooth4 does not add connected devices to search list | ||
---|---|---|---|
Product: | kde-bluetooth | Reporter: | Bartłomiej Zimoń <uzi18> |
Component: | general | Assignee: | Tom Patzig <tom> |
Status: | RESOLVED UNMAINTAINED | ||
Severity: | crash | CC: | afiestas, uzi18 |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Attachments: |
add connected devices to devices list dialog
crash report for above patch Updated patch for 0.4 Updated patch for 0.4 with workaround Forces the remoteDevice disconnection when sendfile is done |
Description
Bartłomiej Zimoń
2009-08-25 16:42:35 UTC
Created attachment 36439 [details]
add connected devices to devices list dialog
I have prepared some code to add connected devices but because of bug in this code or maybe more in solid/solid-bluez it will produce solid crash every secound send file/clipboard operation.
Created attachment 36440 [details]
crash report for above patch
waiting for suggestions/reports for my code
This is crash report of solid
Hi, this has been fixed in the 0.4 version, can you test it please? Alex with or without my patch? without patch works ok with patch cant send 2nd time files: kbluetooth(8503) ObexSession::ObexSession: Konstruktor: "/org/openobex" kbluetooth(8503) KBlueTray::slotSendFile: () kbluetooth(8503) ObexSession::sessionCreated: session interface created for: "/org/openobex/session10" kbluetooth(8503) ObexSession::slotConnectError: Session Connect Error "org.openobex.Error.ConnectionAttemptFailed" "Connecting to remote device failed" Ok so, if without your patch everything is working, then the bug is fixed, isn't it? sorry it's not, because connected devices are not on the list and after my patch they are but have just problem with 2nd session now. It's looks like ConnectionAttemptFailed because it is already connected. Part of OpenObexServer: /* Use non-blocking connect */ fcntl (fd, F_SETFL, O_NONBLOCK); io_channel = g_io_channel_unix_new (fd); if (connect (fd, (struct sockaddr *) &addr, sizeof(addr)) < 0) { /* BlueZ returns EAGAIN eventhough it should return EINPROGRESS */ if (!(errno == EAGAIN || errno == EINPROGRESS)) { g_set_error (&error, ODS_ERROR, ODS_ERROR_CONNECTION_ATTEMPT_FAILED, "Connecting to remote device failed"); goto err; } g_message ("Connect in progress"); cb_data->io_watch = g_io_add_watch (io_channel, G_IO_OUT | G_IO_ERR | G_IO_NVAL | G_IO_HUP, (GIOFunc) client_socket_connect_cb, cb_data); cb_data->fd = fd; } else { /* Connect succeeded with first try */ g_message ("Connect on first try"); client_socket_connect_cb (io_channel, G_IO_OUT, cb_data); } g_io_channel_unref (io_channel); return; err: if (io_channel) g_io_channel_unref (io_channel); if (fd >= 0) close (fd); cb (-1, cb_data->channel, cb_data->imagingdata, error, cb_data->cb_data); ods_bluez_cancellable_free (cb_data); g_clear_error (&error); } Created attachment 37152 [details]
Updated patch for 0.4
For me my patch is ok. but there is Bluez related bug. command: hcitool con shows that device is still connected Created attachment 37153 [details]
Updated patch for 0.4 with workaround
Just add simple workaround:
if we have connected deviced add them to list
but disconnect each just after add to prevent above error
"Connecting to remote device failed" from Obex Data Server.
Alex please confirm if it work for You and add this to SVN.
Maybe You know right way for this?
We could disconnect just selected device.
Created attachment 37238 [details]
Forces the remoteDevice disconnection when sendfile is done
Can you test the attached patch? It just takes care explicitly of disconnect the remote device when the send file is over. Is more or less like your patch but moving the disconnect action to another place. Here with nokia n73 everything is working with or without patch. Thanks! Alex but your solution will not work if other device is connected, because it will not apear on the device sel. list. it is not more/less because you will not find already connected device on list. I will test it soon, but what do you think about it? thanks Hello! Sorry to be the bearer of bad news, but this project has been unmaintained for many years so I am closing this bug. |