summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOndrej Holy <oholy@redhat.com>2015-09-11 12:14:27 +0200
committerOndrej Holy <oholy@redhat.com>2015-09-23 10:08:04 +0200
commit766b99b678d547dec69752f5a2df94cb94c54a7e (patch)
tree07aea57977eee899dae73dbc9343840052b3d16b
parent6f48955f87592aa18cac6a82465643dbdf95a50b (diff)
downloadgvfs-766b99b678d547dec69752f5a2df94cb94c54a7e.tar.gz
job: Unify send_reply debug messages
Unify send_reply debug messages for all jobs. Always indicate failure and include error message. Indicate some other info (i.e. offset, size) for some jobs (i.e. seek, read, write). https://bugzilla.gnome.org/show_bug.cgi?id=755104
-rw-r--r--daemon/gvfsjobcloseread.c3
-rw-r--r--daemon/gvfsjobclosewrite.c3
-rw-r--r--daemon/gvfsjobdbus.c3
-rw-r--r--daemon/gvfsjobenumerate.c3
-rw-r--r--daemon/gvfsjobmount.c3
-rw-r--r--daemon/gvfsjobread.c5
-rw-r--r--daemon/gvfsjobseekread.c4
-rw-r--r--daemon/gvfsjobseekwrite.c4
-rw-r--r--daemon/gvfsjobtruncate.c3
-rw-r--r--daemon/gvfsjobunmount.c3
-rw-r--r--daemon/gvfsjobwrite.c5
11 files changed, 28 insertions, 11 deletions
diff --git a/daemon/gvfsjobcloseread.c b/daemon/gvfsjobcloseread.c
index 00d8bcf3..073a81ab 100644
--- a/daemon/gvfsjobcloseread.c
+++ b/daemon/gvfsjobcloseread.c
@@ -92,7 +92,8 @@ send_reply (GVfsJob *job)
{
GVfsJobCloseRead *op_job = G_VFS_JOB_CLOSE_READ (job);
- g_debug ("job_close_read send reply\n");
+ g_debug ("send_reply(%p), failed=%d (%s)\n", job, job->failed,
+ job->failed ? job->error->message : "");
if (job->failed)
g_vfs_channel_send_error (G_VFS_CHANNEL (op_job->channel), job->error);
diff --git a/daemon/gvfsjobclosewrite.c b/daemon/gvfsjobclosewrite.c
index 1313d650..cff3ae29 100644
--- a/daemon/gvfsjobclosewrite.c
+++ b/daemon/gvfsjobclosewrite.c
@@ -100,7 +100,8 @@ send_reply (GVfsJob *job)
{
GVfsJobCloseWrite *op_job = G_VFS_JOB_CLOSE_WRITE (job);
- g_debug ("job_close_write send reply\n");
+ g_debug ("send_reply(%p), failed=%d (%s)\n", job, job->failed,
+ job->failed ? job->error->message : "");
if (job->failed)
g_vfs_channel_send_error (G_VFS_CHANNEL (op_job->channel), job->error);
diff --git a/daemon/gvfsjobdbus.c b/daemon/gvfsjobdbus.c
index 6b9f4cdd..c77ba796 100644
--- a/daemon/gvfsjobdbus.c
+++ b/daemon/gvfsjobdbus.c
@@ -150,7 +150,8 @@ send_reply (GVfsJob *job)
GVfsJobDBus *dbus_job = G_VFS_JOB_DBUS (job);
GVfsJobDBusClass *class;
- g_debug ("send_reply(%p), failed=%d (%s)\n", job, job->failed, job->failed?job->error->message:"");
+ g_debug ("send_reply(%p), failed=%d (%s)\n", job, job->failed,
+ job->failed ? job->error->message : "");
class = G_VFS_JOB_DBUS_GET_CLASS (job);
diff --git a/daemon/gvfsjobenumerate.c b/daemon/gvfsjobenumerate.c
index b1893e69..bb42a3fd 100644
--- a/daemon/gvfsjobenumerate.c
+++ b/daemon/gvfsjobenumerate.c
@@ -302,7 +302,8 @@ send_reply (GVfsJob *job)
GVfsJobDBus *dbus_job = G_VFS_JOB_DBUS (job);
GVfsJobDBusClass *class;
- g_debug ("send_reply(%p), failed=%d (%s)\n", job, job->failed, job->failed?job->error->message:"");
+ g_debug ("send_reply(%p), failed=%d (%s)\n", job, job->failed,
+ job->failed ? job->error->message : "");
class = G_VFS_JOB_DBUS_GET_CLASS (job);
diff --git a/daemon/gvfsjobmount.c b/daemon/gvfsjobmount.c
index 17fcde07..d8f6db73 100644
--- a/daemon/gvfsjobmount.c
+++ b/daemon/gvfsjobmount.c
@@ -187,7 +187,8 @@ send_reply (GVfsJob *job)
{
GVfsJobMount *op_job = G_VFS_JOB_MOUNT (job);
- g_debug ("send_reply, failed: %d\n", job->failed);
+ g_debug ("send_reply(%p), failed=%d (%s)\n", job, job->failed,
+ job->failed ? job->error->message : "");
if (job->failed)
mount_failed (op_job, job->error);
diff --git a/daemon/gvfsjobread.c b/daemon/gvfsjobread.c
index 2b1a9c63..c58419ed 100644
--- a/daemon/gvfsjobread.c
+++ b/daemon/gvfsjobread.c
@@ -96,7 +96,10 @@ static void
send_reply (GVfsJob *job)
{
GVfsJobRead *op_job = G_VFS_JOB_READ (job);
- g_debug ("job_read send reply, %"G_GSIZE_FORMAT" bytes\n", op_job->data_count);
+
+ g_debug ("send_reply(%p), bytes=%"G_GSIZE_FORMAT", failed=%d (%s)\n",
+ job, op_job->data_count,
+ job->failed, job->failed ? job->error->message : "");
if (job->failed)
g_vfs_channel_send_error (G_VFS_CHANNEL (op_job->channel), job->error);
diff --git a/daemon/gvfsjobseekread.c b/daemon/gvfsjobseekread.c
index 2ca64c60..3ef6eb02 100644
--- a/daemon/gvfsjobseekread.c
+++ b/daemon/gvfsjobseekread.c
@@ -96,7 +96,9 @@ send_reply (GVfsJob *job)
{
GVfsJobSeekRead *op_job = G_VFS_JOB_SEEK_READ (job);
- g_debug ("job_seek_read send reply, pos %d\n", (int)op_job->final_offset);
+ g_debug ("send_reply(%p), pos=%"G_GOFFSET_FORMAT", failed=%d (%s)\n",
+ job, op_job->final_offset,
+ job->failed, job->failed ? job->error->message : "");
if (job->failed)
g_vfs_channel_send_error (G_VFS_CHANNEL (op_job->channel), job->error);
diff --git a/daemon/gvfsjobseekwrite.c b/daemon/gvfsjobseekwrite.c
index 78b8db17..59b9383a 100644
--- a/daemon/gvfsjobseekwrite.c
+++ b/daemon/gvfsjobseekwrite.c
@@ -96,7 +96,9 @@ send_reply (GVfsJob *job)
{
GVfsJobSeekWrite *op_job = G_VFS_JOB_SEEK_WRITE (job);
- g_debug ("job_seek_write send reply, pos %d\n", (int)op_job->final_offset);
+ g_debug ("send_reply(%p), pos=%"G_GOFFSET_FORMAT", failed=%d (%s)\n",
+ job, op_job->final_offset,
+ job->failed, job->failed ? job->error->message : "");
if (job->failed)
g_vfs_channel_send_error (G_VFS_CHANNEL (op_job->channel), job->error);
diff --git a/daemon/gvfsjobtruncate.c b/daemon/gvfsjobtruncate.c
index bac32483..e7d4148b 100644
--- a/daemon/gvfsjobtruncate.c
+++ b/daemon/gvfsjobtruncate.c
@@ -91,7 +91,8 @@ send_reply (GVfsJob *job)
{
GVfsJobTruncate *op_job = G_VFS_JOB_TRUNCATE (job);
- g_debug ("job_truncate send reply\n");
+ g_debug ("send_reply(%p), failed=%d (%s)\n", job, job->failed,
+ job->failed ? job->error->message : "");
if (job->failed)
g_vfs_channel_send_error (G_VFS_CHANNEL (op_job->channel), job->error);
diff --git a/daemon/gvfsjobunmount.c b/daemon/gvfsjobunmount.c
index 6f6e69aa..af6db0db 100644
--- a/daemon/gvfsjobunmount.c
+++ b/daemon/gvfsjobunmount.c
@@ -324,7 +324,8 @@ send_reply (GVfsJob *job)
GVfsJobUnmount *op_job = G_VFS_JOB_UNMOUNT (job);
GVfsBackend *backend = op_job->backend;
- g_debug ("send_reply, failed: %d\n", job->failed);
+ g_debug ("send_reply(%p), failed=%d (%s)\n", job, job->failed,
+ job->failed ? job->error->message : "");
if (job->failed)
{
diff --git a/daemon/gvfsjobwrite.c b/daemon/gvfsjobwrite.c
index a00e307c..bc6cbd2e 100644
--- a/daemon/gvfsjobwrite.c
+++ b/daemon/gvfsjobwrite.c
@@ -99,7 +99,10 @@ static void
send_reply (GVfsJob *job)
{
GVfsJobWrite *op_job = G_VFS_JOB_WRITE (job);
- g_debug ("job_write send reply\n");
+
+ g_debug ("send_reply(%p), bytes=%"G_GSIZE_FORMAT", failed=%d (%s)\n",
+ job, op_job->written_size,
+ job->failed, job->failed ? job->error->message : "");
if (job->failed)
g_vfs_channel_send_error (G_VFS_CHANNEL (op_job->channel), job->error);