]> git.ipfire.org Git - thirdparty/snapper.git/commitdiff
- work on dbus interface
authorArvin Schnell <aschnell@suse.de>
Tue, 10 Jul 2012 13:55:58 +0000 (15:55 +0200)
committerArvin Schnell <aschnell@suse.de>
Tue, 10 Jul 2012 13:55:58 +0000 (15:55 +0200)
server/snapperd.cc

index c3b69d641bbf3cc4a3b499a67afb940a5a91d6e7..01c02f4addc7aac408e9bce20c84ea98e081f787 100644 (file)
@@ -1262,10 +1262,12 @@ dispatch(DBus::Connection& conn, DBus::Message& msg)
 void
 listen(DBus::Connection& conn)
 {
-    y2mil("Listening for method calls and signals");
+    y2mil("Requesting DBus name");
 
     conn.request_name("org.opensuse.snapper", DBUS_NAME_FLAG_REPLACE_EXISTING);
 
+    y2mil("Listening for method calls and signals");
+
     conn.add_match("type='signal', interface='" DBUS_INTERFACE_DBUS "', member='NameOwnerChanged'");
 
     int idle = 0;
@@ -1341,10 +1343,22 @@ listen(DBus::Connection& conn)
 }
 
 
+void
+log_do(LogLevel level, const string& component, const char* file, const int line, const char* func,
+       const string& text)
+{
+    cerr << text << endl;
+}
+
+
 int
 main(int argc, char** argv)
 {
+#if 0
     initDefaultLogger();
+#else
+    setLogDo(&log_do);
+#endif
 
     DBus::Connection conn(DBUS_BUS_SYSTEM);