21
21
22
22
#include "config.h"
23
23
24
+ #define G_LOG_DOMAIN "AtrilDaemon"
24
25
#include <glib.h>
25
26
#include <glib/gstdio.h>
26
27
#include <gio/gio.h>
41
42
42
43
#define DAEMON_TIMEOUT (30) /* seconds */
43
44
44
- #define LOG g_printerr
45
+ #define LOG g_debug
45
46
46
47
47
48
#define EV_TYPE_DAEMON_APPLICATION (ev_daemon_application_get_type ())
@@ -136,7 +137,7 @@ name_appeared_cb (GDBusConnection *connection,
136
137
const gchar * name_owner ,
137
138
gpointer user_data )
138
139
{
139
- LOG ("Watch name'%s' appeared with owner '%s'\n " , name , name_owner );
140
+ LOG ("Watch name'%s' appeared with owner '%s'" , name , name_owner );
140
141
}
141
142
142
143
static void
@@ -147,15 +148,15 @@ name_vanished_cb (GDBusConnection *connection,
147
148
EvDaemonApplication * application = EV_DAEMON_APPLICATION (user_data );
148
149
GList * l ;
149
150
150
- LOG ("Watch name'%s' disappeared\n " , name );
151
+ LOG ("Watch name'%s' disappeared" , name );
151
152
152
153
for (l = application -> docs ; l != NULL ; l = l -> next ) {
153
154
EvDoc * doc = (EvDoc * ) l -> data ;
154
155
155
156
if (strcmp (doc -> dbus_name , name ) != 0 )
156
157
continue ;
157
158
158
- LOG ("Watch found URI '%s' for name; removing\n " , doc -> uri );
159
+ LOG ("Watch found URI '%s' for name; removing" , doc -> uri );
159
160
160
161
application -> docs = g_list_delete_link (application -> docs , l );
161
162
ev_doc_free (doc );
@@ -174,7 +175,7 @@ process_pending_invocations (EvDaemonApplication *application,
174
175
GList * l ;
175
176
GList * uri_invocations ;
176
177
177
- LOG ("RegisterDocument process pending invocations for URI %s\n " , uri );
178
+ LOG ("RegisterDocument process pending invocations for URI %s" , uri );
178
179
uri_invocations = g_hash_table_lookup (application -> pending_invocations , uri );
179
180
180
181
for (l = uri_invocations ; l != NULL ; l = l -> next ) {
@@ -224,7 +225,7 @@ handle_register_document_cb (EvDaemon *object,
224
225
225
226
doc = ev_daemon_application_find_doc (application , uri );
226
227
if (doc != NULL ) {
227
- LOG ("RegisterDocument found owner '%s' for URI '%s'\n " , doc -> dbus_name , uri );
228
+ LOG ("RegisterDocument found owner '%s' for URI '%s'" , doc -> dbus_name , uri );
228
229
ev_daemon_complete_register_document (object , invocation , doc -> dbus_name );
229
230
230
231
return TRUE;
@@ -233,7 +234,7 @@ handle_register_document_cb (EvDaemon *object,
233
234
sender = g_dbus_method_invocation_get_sender (invocation );
234
235
connection = g_dbus_method_invocation_get_connection (invocation );
235
236
236
- LOG ("RegisterDocument registered owner '%s' for URI '%s'\n " , sender , uri );
237
+ LOG ("RegisterDocument registered owner '%s' for URI '%s'" , sender , uri );
237
238
238
239
doc = g_new (EvDoc , 1 );
239
240
doc -> dbus_name = g_strdup (sender );
@@ -273,11 +274,11 @@ handle_unregister_document_cb (EvDaemon *object,
273
274
EvDoc * doc ;
274
275
const char * sender ;
275
276
276
- LOG ("UnregisterDocument URI '%s'\n " , uri );
277
+ LOG ("UnregisterDocument URI '%s'" , uri );
277
278
278
279
doc = ev_daemon_application_find_doc (application , uri );
279
280
if (doc == NULL ) {
280
- LOG ("UnregisterDocument URI was not registered!\n " );
281
+ LOG ("UnregisterDocument URI was not registered!" );
281
282
g_dbus_method_invocation_return_error_literal (invocation ,
282
283
G_DBUS_ERROR ,
283
284
G_DBUS_ERROR_INVALID_ARGS ,
@@ -287,7 +288,7 @@ handle_unregister_document_cb (EvDaemon *object,
287
288
288
289
sender = g_dbus_method_invocation_get_sender (invocation );
289
290
if (strcmp (doc -> dbus_name , sender ) != 0 ) {
290
- LOG ("UnregisterDocument called by non-owner (owner '%s' sender '%s')\n " ,
291
+ LOG ("UnregisterDocument called by non-owner (owner '%s' sender '%s')" ,
291
292
doc -> dbus_name , sender );
292
293
293
294
g_dbus_method_invocation_return_error_literal (invocation ,
@@ -323,7 +324,7 @@ handle_find_document_cb (EvDaemon *object,
323
324
{
324
325
EvDoc * doc ;
325
326
326
- LOG ("FindDocument URI '%s' \n " , uri );
327
+ LOG ("FindDocument URI '%s'" , uri );
327
328
328
329
doc = ev_daemon_application_find_doc (application , uri );
329
330
if (doc != NULL ) {
@@ -353,7 +354,7 @@ handle_find_document_cb (EvDaemon *object,
353
354
}
354
355
}
355
356
356
- LOG ("FindDocument URI '%s' was not registered!\n " , uri );
357
+ LOG ("FindDocument URI '%s' was not registered!" , uri );
357
358
// FIXME: shouldn't this return an error then?
358
359
ev_daemon_complete_find_document (object , invocation , "" );
359
360
0 commit comments