summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Hruby <michal.mhr@gmail.com>2011-11-15 13:11:23 +0100
committerMichal Hruby <michal.mhr@gmail.com>2011-11-15 13:11:23 +0100
commit4a6612258733ac8803948e83a56df5e4bd9b76c3 (patch)
treef53bad8b9b7be3d3a4ad1ef1f98923f7414d55f8
parent2c591f0466649f2855b264b70928b43f61929b14 (diff)
Return non-zero error code if we can't get the dbus name
-rw-r--r--src/zeitgeist-datahub.vala7
1 files changed, 6 insertions, 1 deletions
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<Event> 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;
}
}