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 739872 - Cannot enable webdav and bluetooth sharing at same time
Cannot enable webdav and bluetooth sharing at same time
Status: RESOLVED FIXED
Product: gnome-user-share
Classification: Core
Component: general
3.14.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-user-share maintainers
gnome-user-share maintainers
Depends on:
Blocks:
 
 
Reported: 2014-11-10 12:11 UTC by Cosimo Cecchi
Modified: 2014-11-13 17:21 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
webdav: remove unused defines (1.14 KB, patch)
2014-11-10 12:11 UTC, Cosimo Cecchi
committed Details | Review
webdav: remove unused code (1.29 KB, patch)
2014-11-10 12:12 UTC, Cosimo Cecchi
committed Details | Review
webdav: use GApplication for unique instance (4.84 KB, patch)
2014-11-10 12:12 UTC, Cosimo Cecchi
committed Details | Review
obexpush: make obex_agent_up() and obex_agent_down() symmetric (1.74 KB, patch)
2014-11-10 12:12 UTC, Cosimo Cecchi
committed Details | Review
obexpush: use GApplication for unique instance (7.44 KB, patch)
2014-11-10 12:12 UTC, Cosimo Cecchi
committed Details | Review

Description Cosimo Cecchi 2014-11-10 12:11:30 UTC
Currently, the gnome-user-share webdav and obexpush helpers use an X selection for unique instance. When in [1] gnome-user-share was split into the two binaries, the code was still using the same selection name in both, which prevents concurrent use.

While that is easy to fix, my patches opt for another approach and convert the binaries to use GApplication for unique instance handling.

[1] https://git.gnome.org/browse/gnome-user-share/commit/?id=d6eb26cca2c96a92f7420407229c0a332b4dc439
Comment 1 Cosimo Cecchi 2014-11-10 12:11:58 UTC
Created attachment 290330 [details] [review]
webdav: remove unused defines

This are leftovers from before the gnome-user-share binary was split in
two.
Comment 2 Cosimo Cecchi 2014-11-10 12:12:03 UTC
Created attachment 290331 [details] [review]
webdav: remove unused code
Comment 3 Cosimo Cecchi 2014-11-10 12:12:07 UTC
Created attachment 290332 [details] [review]
webdav: use GApplication for unique instance

Instead of getting an X selection. Currently, the obexpush and webdav
helpers compete for the same selection, so it's impossible to run them
both at the same time.
Comment 4 Cosimo Cecchi 2014-11-10 12:12:12 UTC
Created attachment 290333 [details] [review]
obexpush: make obex_agent_up() and obex_agent_down() symmetric

Make these two functions idempotent and symmetric in return value;
obex_agent_up() cannot return NULL since obex_agent_new() won't ever
return a NULL GObject.
Comment 5 Cosimo Cecchi 2014-11-10 12:12:16 UTC
Created attachment 290334 [details] [review]
obexpush: use GApplication for unique instance

Similar to what we just did for webdav, stop using an X selection to
ensure an unique instance of this.
Also, cleanup the code a little bit in the process.
Comment 6 Bastien Nocera 2014-11-13 16:40:03 UTC
Review of attachment 290330 [details] [review]:

Sure.
Comment 7 Bastien Nocera 2014-11-13 16:40:22 UTC
Review of attachment 290331 [details] [review]:

Sure.
Comment 8 Bastien Nocera 2014-11-13 16:41:40 UTC
Review of attachment 290332 [details] [review]:

Looks fine to me.

::: src/user_share-webdav.c
@@ +133,3 @@
 
+	application = g_application_new ("org.gnome.user-share.webdav",
+									 G_APPLICATION_FLAGS_NONE);

indentation?
Comment 9 Bastien Nocera 2014-11-13 16:42:12 UTC
Review of attachment 290333 [details] [review]:

Yep.
Comment 10 Bastien Nocera 2014-11-13 16:43:05 UTC
Review of attachment 290334 [details] [review]:

Looks fine otherwise.

::: src/user_share-obexpush.c
@@ +231,2 @@
+	application = g_application_new ("org.gnome.user-share.obexpush",
+									 G_APPLICATION_FLAGS_NONE);

Indentation again.
Comment 11 Cosimo Cecchi 2014-11-13 17:20:57 UTC
Thanks, pushed to master with indentation fixed.

Attachment 290330 [details] pushed as e1566b1 - webdav: remove unused defines
Attachment 290331 [details] pushed as 8f092f6 - webdav: remove unused code
Attachment 290332 [details] pushed as eab2401 - webdav: use GApplication for unique instance
Attachment 290333 [details] pushed as cfbcbe5 - obexpush: make obex_agent_up() and obex_agent_down() symmetric
Attachment 290334 [details] pushed as cc4d8fd - obexpush: use GApplication for unique instance