Post Office uses URL Dispatcher DBus interface which isn't stable

Bug #1356077 reported by Ted Gould
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
URL Dispatcher
Fix Released
Undecided
Ted Gould
Ubuntu Push Notifications
Fix Released
Undecided
Unassigned
url-dispatcher (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Please use liburl-dispatcher, the versioned interface to URL Dispatcher. The DBus interface may change arbitrarily in the future.

Related branches

Revision history for this message
John Lenton (chipaca) wrote :

Where are the go bindings for liburl-dispatcher? We're trying to remove code that uses a glib mainloop from the go app, not add to it.

Changed in ubuntu-push:
status: New → Incomplete
Revision history for this message
Ted Gould (ted) wrote : Re: [Bug 1356077] Re: Post Office uses URL Dispatcher DBus interface which isn't stable

On Thu, 2014-08-14 at 09:53 +0000, John Lenton wrote:

> Where are the go bindings for liburl-dispatcher? We're trying to remove
> code that uses a glib mainloop from the go app, not add to it.

There aren't any Go bindings, but that doesn't mean you should use an
unstable API. The only reason you'd need a GLib mainloop is for the
callback. If you leave out the callback on the send you don't need a
mainloop for anything.

Revision history for this message
John Lenton (chipaca) wrote :

No, that's not true. Neither url_dispatch_send nor url_dispatch_send_restricted work unless you have a mainloop running. I've tested it with

#include <url-dispatcher.h>
#include <stdio.h>

int main() {
  const gchar* urls[2] = {"settings:///system/system-update", NULL};
  gchar** appids = url_dispatch_url_appid(urls);
  puts(appids[0]);
  url_dispatch_send(urls[0], NULL, NULL);

  g_main_loop_run(g_main_loop_new(NULL, FALSE));
  return 0;
}

and if you comment out the main loop, the dispatch doesn't run. This might be abug however.

Revision history for this message
Ted Gould (ted) wrote :

That's because when you comment out the mainloop the process exits before the dbus message can be sent. If you replace it with a "sleep(100)" it should work (for some reason I can't get it to compile).

Ted Gould (ted)
Changed in url-dispatcher:
assignee: nobody → Ted Gould (ted)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package url-dispatcher - 0.1+14.10.20140819.1-0ubuntu1

---------------
url-dispatcher (0.1+14.10.20140819.1-0ubuntu1) utopic; urgency=low

  [ Ted Gould ]
  * Ensure send works even without a mainloop (LP: #1356077)
  * Test replacing a timestamp
 -- Ubuntu daily release <email address hidden> Tue, 19 Aug 2014 21:01:10 +0000

Changed in url-dispatcher (Ubuntu):
status: New → Fix Released
John Lenton (chipaca)
Changed in ubuntu-push:
status: Incomplete → Fix Released
Ted Gould (ted)
Changed in url-dispatcher:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.