After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 653479 - address command-line argument for gnome-bluetooth shouldn't be quoted
address command-line argument for gnome-bluetooth shouldn't be quoted
Status: RESOLVED FIXED
Product: gnome-bluetooth
Classification: Core
Component: applet
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-bluetooth-general-maint@gnome.bugs
gnome-bluetooth-general-maint@gnome.bugs
: 645642 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2011-06-27 12:45 UTC by Raul Gutierrez Segales
Modified: 2011-06-27 16:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Don't quote destination address (816 bytes, patch)
2011-06-27 12:45 UTC, Raul Gutierrez Segales
committed Details | Review
Removal of other parameters which need no quotes (1.44 KB, patch)
2011-06-27 14:00 UTC, Raul Gutierrez Segales
committed Details | Review
Patch for the MeeGo branch (1.55 KB, patch)
2011-06-27 14:04 UTC, Raul Gutierrez Segales
none Details | Review

Description Raul Gutierrez Segales 2011-06-27 12:45:36 UTC
Created attachment 190747 [details] [review]
Don't quote destination address

Right now sending files to a bluetooth (paired) device from gnome-shell via:

- click on bluetooth applet
- click on device
- click on send files ..

fails because the address of the destination device is received with extra quotes (i.e.: \"5C:57:C8:C4:XX:XX\"). 

We could either unquote that from bluetooth-sendto or avoid the quotes entirely since there are no spaces nor conflicting characters in addresses. The attached patch does the latter.
Comment 1 Alban Crequy 2011-06-27 13:41:06 UTC
> since there are no spaces nor conflicting characters in addresses.

It is not because there are no spaces or conflicting characters but because g_spawn_async() doesn't need quotes. It either uses execve(2) which does not need quotes or it escapes and protects the string on Windows. So it works even if there was spaces :)


The same change should be done in other part of the code:

applet/bluetooth-applet.c::bluetooth_applet_send_to_address
                s = g_strdup_printf ("--device=%s", address);
                s = g_strdup_printf ("--name=%s", alias);

moblin/moblin-panel.c::send_file_button_clicked_cb
                s = g_strdup_printf ("--device=%s", address);
                s = g_strdup_printf ("--name=%s", name);



In the MeeGo branch, there is an additional change:

applet/main.c::sendto_callback
                s = g_strdup_printf ("--device=%s", address);
                s = g_strdup_printf ("--name=%s", alias);
Comment 2 Raul Gutierrez Segales 2011-06-27 14:00:54 UTC
Created attachment 190752 [details] [review]
Removal of other parameters which need no quotes

Remove the other quotes as pointed out by Alban.
Comment 3 Raul Gutierrez Segales 2011-06-27 14:04:50 UTC
Created attachment 190753 [details] [review]
Patch for the MeeGo branch
Comment 4 Bastien Nocera 2011-06-27 14:29:19 UTC
If somebody still cares of the meego branch, they can merge that last patch.
Comment 5 Bastien Nocera 2011-06-27 16:00:35 UTC
*** Bug 645642 has been marked as a duplicate of this bug. ***