GNOME Bugzilla – Bug 739872
Cannot enable webdav and bluetooth sharing at same time
Last modified: 2014-11-13 17:21:11 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
Created attachment 290330 [details] [review] webdav: remove unused defines This are leftovers from before the gnome-user-share binary was split in two.
Created attachment 290331 [details] [review] webdav: remove unused code
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.
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.
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.
Review of attachment 290330 [details] [review]: Sure.
Review of attachment 290331 [details] [review]: Sure.
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?
Review of attachment 290333 [details] [review]: Yep.
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.
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