gvfs r1802 - in trunk: . daemon
- From: cosimoc svn gnome org
- To: svn-commits-list gnome org
- Subject: gvfs r1802 - in trunk: . daemon
- Date: Tue, 10 Jun 2008 14:35:39 +0000 (UTC)
Author: cosimoc
Date: Tue Jun 10 14:35:39 2008
New Revision: 1802
URL: http://svn.gnome.org/viewvc/gvfs?rev=1802&view=rev
Log:
2008-06-10 Cosimo Cecchi <cosimoc gnome org>
* daemon/gvfsbackendarchive.c: (gvfs_archive_pop_job):
* daemon/gvfsbackenddav.c: (stat_location), (write_ready),
(close_write_ready), (do_make_directory), (do_delete):
* daemon/gvfsbackendftp.c:
(ftp_connection_set_error_from_response):
* daemon/gvfsbackendhttp.c: (g_vfs_job_failed_from_http_status),
(open_for_read_ready), (read_ready), (try_seek_on_read),
(close_read_ready):
* daemon/gvfsbackendobexftp.c: (_query_file_info_helper),
(error_occurred_cb), (do_delete):
Fix build warnings with GCC 4.3.0 (#537588).
* daemon/gvfsjob.c: (g_vfs_job_failed), (g_vfs_job_failed_literal):
* daemon/gvfsjob.h:
Add g_vfs_job_failed_literal ().
Modified:
trunk/ChangeLog
trunk/daemon/gvfsbackendarchive.c
trunk/daemon/gvfsbackenddav.c
trunk/daemon/gvfsbackendftp.c
trunk/daemon/gvfsbackendhttp.c
trunk/daemon/gvfsbackendobexftp.c
trunk/daemon/gvfsjob.c
trunk/daemon/gvfsjob.h
Modified: trunk/daemon/gvfsbackendarchive.c
==============================================================================
--- trunk/daemon/gvfsbackendarchive.c (original)
+++ trunk/daemon/gvfsbackendarchive.c Tue Jun 10 14:35:39 2008
@@ -180,10 +180,10 @@
}
else if (archive_errno (archive->archive))
{
- g_vfs_job_failed (archive->job,
- G_IO_ERROR,
- archive_errno (archive->archive),
- archive_error_string (archive->archive));
+ g_vfs_job_failed_literal (archive->job,
+ G_IO_ERROR,
+ archive_errno (archive->archive),
+ archive_error_string (archive->archive));
}
else
g_vfs_job_succeeded (archive->job);
Modified: trunk/daemon/gvfsbackenddav.c
==============================================================================
--- trunk/daemon/gvfsbackenddav.c (original)
+++ trunk/daemon/gvfsbackenddav.c Tue Jun 10 14:35:39 2008
@@ -1133,7 +1133,7 @@
g_set_error (error,
G_IO_ERROR,
http_error_code_from_status (status),
- msg->reason_phrase);
+ "%s", msg->reason_phrase);
return FALSE;
}
@@ -1887,10 +1887,10 @@
if (nwrote < 0)
{
- g_vfs_job_failed (G_VFS_JOB (job),
- error->domain,
- error->code,
- error->message);
+ g_vfs_job_failed_literal (G_VFS_JOB (job),
+ error->domain,
+ error->code,
+ error->message);
g_error_free (error);
return;
@@ -1940,10 +1940,10 @@
&error);
if (res == FALSE)
{
- g_vfs_job_failed (G_VFS_JOB (job),
- error->domain,
- error->code,
- error->message);
+ g_vfs_job_failed_literal (G_VFS_JOB (job),
+ error->domain,
+ error->code,
+ error->message);
g_error_free (error);
}
@@ -1992,9 +1992,9 @@
G_IO_ERROR_EXISTS,
_("Target file already exists"));
else
- g_vfs_job_failed (G_VFS_JOB (job), G_IO_ERROR,
- http_error_code_from_status (status),
- msg->reason_phrase);
+ g_vfs_job_failed_literal (G_VFS_JOB (job), G_IO_ERROR,
+ http_error_code_from_status (status),
+ msg->reason_phrase);
else
g_vfs_job_succeeded (G_VFS_JOB (job));
@@ -2039,10 +2039,10 @@
status = g_vfs_backend_dav_send_message (backend, msg);
if (!SOUP_STATUS_IS_SUCCESSFUL (status))
- g_vfs_job_failed (G_VFS_JOB (job),
- G_IO_ERROR,
- http_error_code_from_status (status),
- msg->reason_phrase);
+ g_vfs_job_failed_literal (G_VFS_JOB (job),
+ G_IO_ERROR,
+ http_error_code_from_status (status),
+ msg->reason_phrase);
else
g_vfs_job_succeeded (G_VFS_JOB (job));
Modified: trunk/daemon/gvfsbackendftp.c
==============================================================================
--- trunk/daemon/gvfsbackendftp.c (original)
+++ trunk/daemon/gvfsbackendftp.c Tue Jun 10 14:35:39 2008
@@ -288,7 +288,7 @@
}
DEBUG ("error: %s\n", msg);
- g_set_error (&conn->error, G_IO_ERROR, code, msg);
+ g_set_error (&conn->error, G_IO_ERROR, code, "%s", msg);
}
/**
Modified: trunk/daemon/gvfsbackendhttp.c
==============================================================================
--- trunk/daemon/gvfsbackendhttp.c (original)
+++ trunk/daemon/gvfsbackendhttp.c Tue Jun 10 14:35:39 2008
@@ -230,8 +230,8 @@
switch (status_code) {
case SOUP_STATUS_NOT_FOUND:
- g_vfs_job_failed (job, G_IO_ERROR, G_IO_ERROR_NOT_FOUND,
- message);
+ g_vfs_job_failed_literal (job, G_IO_ERROR, G_IO_ERROR_NOT_FOUND,
+ message);
break;
case SOUP_STATUS_UNAUTHORIZED:
@@ -340,10 +340,10 @@
&error);
if (res == FALSE)
{
- g_vfs_job_failed (G_VFS_JOB (job),
- error->domain,
- error->code,
- error->message);
+ g_vfs_job_failed_literal (G_VFS_JOB (job),
+ error->domain,
+ error->code,
+ error->message);
g_error_free (error);
return;
@@ -401,10 +401,10 @@
if (nread < 0)
{
- g_vfs_job_failed (G_VFS_JOB (job),
- error->domain,
- error->code,
- error->message);
+ g_vfs_job_failed_literal (G_VFS_JOB (job),
+ error->domain,
+ error->code,
+ error->message);
g_error_free (error);
return;
@@ -451,10 +451,10 @@
if (!g_seekable_seek (G_SEEKABLE (stream), offset, type,
G_VFS_JOB (job)->cancellable, &error))
{
- g_vfs_job_failed (G_VFS_JOB (job),
- error->domain,
- error->code,
- error->message);
+ g_vfs_job_failed_literal (G_VFS_JOB (job),
+ error->domain,
+ error->code,
+ error->message);
g_error_free (error);
return FALSE;
}
@@ -485,10 +485,10 @@
&error);
if (res == FALSE)
{
- g_vfs_job_failed (G_VFS_JOB (job),
- error->domain,
- error->code,
- error->message);
+ g_vfs_job_failed_literal (G_VFS_JOB (job),
+ error->domain,
+ error->code,
+ error->message);
g_error_free (error);
}
Modified: trunk/daemon/gvfsbackendobexftp.c
==============================================================================
--- trunk/daemon/gvfsbackendobexftp.c (original)
+++ trunk/daemon/gvfsbackendobexftp.c Tue Jun 10 14:35:39 2008
@@ -487,7 +487,7 @@
{
g_set_error (error, G_IO_ERROR,
G_IO_ERROR_NOT_FOUND,
- g_strerror (ENOENT));
+ "%s", g_strerror (ENOENT));
}
g_free (basename);
@@ -519,9 +519,9 @@
if (op_backend->doing_io)
{
op_backend->status = ASYNC_ERROR;
- op_backend->error = g_error_new (DBUS_GERROR,
- DBUS_GERROR_REMOTE_EXCEPTION,
- error_message);
+ op_backend->error = g_error_new_literal (DBUS_GERROR,
+ DBUS_GERROR_REMOTE_EXCEPTION,
+ error_message);
g_cond_signal (op_backend->cond);
g_mutex_unlock (op_backend->mutex);
return;
@@ -1309,7 +1309,7 @@
g_mutex_unlock (op_backend->mutex);
g_set_error (&error, G_IO_ERROR,
G_IO_ERROR_NOT_EMPTY,
- g_strerror (ENOTEMPTY));
+ "%s", g_strerror (ENOTEMPTY));
g_vfs_job_failed_from_error (G_VFS_JOB (job), error);
g_error_free (error);
return;
Modified: trunk/daemon/gvfsjob.c
==============================================================================
--- trunk/daemon/gvfsjob.c (original)
+++ trunk/daemon/gvfsjob.c Tue Jun 10 14:35:39 2008
@@ -247,17 +247,26 @@
va_list args;
char *message;
- if (job->failed)
- return;
-
- job->failed = TRUE;
-
va_start (args, format);
message = g_strdup_vprintf (format, args);
va_end (args);
- job->error = g_error_new (domain, code, message);
+ g_vfs_job_failed_literal (job, domain, code, message);
g_free (message);
+}
+
+void
+g_vfs_job_failed_literal (GVfsJob *job,
+ GQuark domain,
+ gint code,
+ const gchar *message)
+{
+ if (job->failed)
+ return;
+
+ job->failed = TRUE;
+
+ job->error = g_error_new_literal (domain, code, message);
g_vfs_job_send_reply (job);
}
Modified: trunk/daemon/gvfsjob.h
==============================================================================
--- trunk/daemon/gvfsjob.h (original)
+++ trunk/daemon/gvfsjob.h Tue Jun 10 14:35:39 2008
@@ -93,6 +93,10 @@
gint code,
const gchar *format,
...) G_GNUC_PRINTF (4, 5);
+void g_vfs_job_failed_literal (GVfsJob *job,
+ GQuark domain,
+ gint code,
+ const gchar *message);
void g_vfs_job_failed_from_error (GVfsJob *job,
const GError*error);
void g_vfs_job_failed_from_errno (GVfsJob *job,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]