From 4a6612258733ac8803948e83a56df5e4bd9b76c3 Mon Sep 17 00:00:00 2001 From: Michal Hruby Date: Tue, 15 Nov 2011 13:11:23 +0100 Subject: Return non-zero error code if we can't get the dbus name --- src/zeitgeist-datahub.vala | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/zeitgeist-datahub.vala b/src/zeitgeist-datahub.vala index 3e59a8c..1260849 100644 --- a/src/zeitgeist-datahub.vala +++ b/src/zeitgeist-datahub.vala @@ -38,6 +38,8 @@ public class DataHub : Object, DataHubService private GenericArray queued_events; private uint idle_id = 0; + public int return_code { get; private set; default = 0; } + public DataHub () { GLib.Object (); @@ -217,6 +219,7 @@ public class DataHub : Object, DataHubService { warning ("Unable to get name \"org.gnome.zeitgeist.datahub\"" + " on the bus!"); + this.return_code = 1; this.quit (); } ); @@ -267,9 +270,11 @@ public class DataHub : Object, DataHubService return arr; } - public static void main (string[] args) + public static int main (string[] args) { var hub = new DataHub (); hub.run (); + + return hub.return_code; } } -- cgit v1.2.3