gnome-vfs r5437 - in trunk: . libgnomevfs modules
- From: chpe svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-vfs r5437 - in trunk: . libgnomevfs modules
- Date: Mon, 28 Jan 2008 12:56:58 +0000 (GMT)
Author: chpe
Date: Mon Jan 28 12:56:58 2008
New Revision: 5437
URL: http://svn.gnome.org/viewvc/gnome-vfs?rev=5437&view=rev
Log:
2008-01-28 Christian Persch <chpe gnome org>
* libgnomevfs/gnome-vfs-hal-mounts.c: (_hal_device_added),
(_hal_device_removed), (_gnome_vfs_hal_mounts_init):
* libgnomevfs/gnome-vfs-mime-handlers.c:
* modules/sftp-method.c: (buffer_send), (buffer_recv),
(buffer_read_file_info), (iobuf_read_file_info), (sftp_connect),
(sftp_get_connection), (sftp_connection_process_errors),
(sftp_connection_get_id), (get_real_path), (do_open), (do_create),
(do_close), (do_read), (do_write), (do_seek), (do_tell),
(sftp_readlink), (get_file_info_for_path), (do_get_file_info),
(do_get_file_info_from_handle), (do_open_directory),
(do_read_directory), (do_set_file_info):
* modules/smb-method.c: (cache_reap_cb):
Use G_STRFUNC instead of the deprecated G_GNUC_FUNCTION.
Modified:
trunk/ChangeLog
trunk/libgnomevfs/gnome-vfs-hal-mounts.c
trunk/libgnomevfs/gnome-vfs-mime-handlers.c
trunk/modules/sftp-method.c
trunk/modules/smb-method.c
Modified: trunk/libgnomevfs/gnome-vfs-hal-mounts.c
==============================================================================
--- trunk/libgnomevfs/gnome-vfs-hal-mounts.c (original)
+++ trunk/libgnomevfs/gnome-vfs-hal-mounts.c Mon Jan 28 12:56:58 2008
@@ -1172,7 +1172,7 @@
GnomeVFSVolumeMonitorDaemon *volume_monitor_daemon;
#ifdef HAL_SHOW_DEBUG
- g_debug ("Entering %s for udi %s", G_GNUC_FUNCTION, udi);
+ g_debug ("Entering %s for udi %s", G_STRFUNC, udi);
#endif
hal_userdata = (GnomeVFSHalUserData *) libhal_ctx_get_user_data (hal_ctx);
@@ -1259,7 +1259,7 @@
char *hal_drive_udi;
#ifdef HAL_SHOW_DEBUG
- g_debug ("Entering %s for udi %s", G_GNUC_FUNCTION, udi);
+ g_debug ("Entering %s for udi %s", G_STRFUNC, udi);
#endif
hal_userdata = (GnomeVFSHalUserData *) libhal_ctx_get_user_data (hal_ctx);
@@ -1438,7 +1438,7 @@
GnomeVFSHalUserData *hal_userdata;
#ifdef HAL_SHOW_DEBUG
- g_debug ("Entering %s", G_GNUC_FUNCTION);
+ g_debug ("Entering %s", G_STRFUNC);
#endif
/* Initialise the connection to the hal daemon */
Modified: trunk/libgnomevfs/gnome-vfs-mime-handlers.c
==============================================================================
--- trunk/libgnomevfs/gnome-vfs-mime-handlers.c (original)
+++ trunk/libgnomevfs/gnome-vfs-mime-handlers.c Mon Jan 28 12:56:58 2008
@@ -41,7 +41,7 @@
#define MIXED_API_WARNING "Cannot call %s with a GNOMEVFSMimeApplication structure "\
"constructed by the deprecated application registry", \
- G_GNUC_FUNCTION
+ G_STRFUNC
struct _GnomeVFSMimeApplicationPrivate
{
Modified: trunk/modules/sftp-method.c
==============================================================================
--- trunk/modules/sftp-method.c (original)
+++ trunk/modules/sftp-method.c Mon Jan 28 12:56:58 2008
@@ -317,7 +317,7 @@
g_return_val_if_fail (buf->base != NULL, GNOME_VFS_ERROR_INTERNAL);
DEBUG2 (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Sending message of length %d from %p to %d",
- G_GNUC_FUNCTION, len, buf, fd));
+ G_STRFUNC, len, buf, fd));
buf->read_ptr -= sizeof (guint32);
@@ -338,7 +338,7 @@
}
DEBUG2 (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: %d bytes written",
- G_GNUC_FUNCTION, bytes_written));
+ G_STRFUNC, bytes_written));
return res;
}
@@ -352,24 +352,24 @@
g_return_val_if_fail (buf->base != NULL, GNOME_VFS_ERROR_INTERNAL);
DEBUG2 (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Receiving message from %d to %p",
- G_GNUC_FUNCTION, fd, buf));
+ G_STRFUNC, fd, buf));
bytes_read = atomic_io (read, fd, &r_len, sizeof (guint32));
if (bytes_read == -1) {
DEBUG2 (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Could not read length: %s",
- G_GNUC_FUNCTION, g_strerror (errno)));
+ G_STRFUNC, g_strerror (errno)));
return GNOME_VFS_ERROR_IO;
}
else if (bytes_read == 0) {
DEBUG2 (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Connection closed: %d",
- G_GNUC_FUNCTION, fd));
+ G_STRFUNC, fd));
return GNOME_VFS_ERROR_IO;
}
len = GINT32_TO_BE (r_len);
- DEBUG2 (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Message is of length %d", G_GNUC_FUNCTION, len));
+ DEBUG2 (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Message is of length %d", G_STRFUNC, len));
/* 256K was the max allowed in OpenSSH */
if (len > 256 * 1024) {
@@ -385,7 +385,7 @@
}
DEBUG2 (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: %d bytes read",
- G_GNUC_FUNCTION, bytes_read));
+ G_STRFUNC, bytes_read));
buf->write_ptr += bytes_read;
@@ -518,7 +518,7 @@
info->valid_fields |= GNOME_VFS_FILE_INFO_FIELDS_PERMISSIONS;
info->permissions = buffer_read_gint32 (buf);
- DEBUG4 (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Permissions is %x", G_GNUC_FUNCTION,
+ DEBUG4 (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Permissions is %x", G_STRFUNC,
info->permissions));
info->valid_fields |= GNOME_VFS_FILE_INFO_FIELDS_TYPE;
@@ -757,7 +757,7 @@
status = buffer_read_gint32 (&msg);
DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG,
"%s: Reading file info failed with SSH2_FXP_STATUS(%u), status %u",
- G_GNUC_FUNCTION, type, status));
+ G_STRFUNC, type, status));
res = sftp_status_to_vfs_result (status);
} else if (type == SSH2_FXP_ATTRS) {
buffer_read_file_info (&msg, info);
@@ -1189,7 +1189,7 @@
args[last_arg++] = NULL;
DEBUG (tmp = g_strjoinv (" ", args));
- DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Command line is %s", G_GNUC_FUNCTION, tmp));
+ DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Command line is %s", G_STRFUNC, tmp));
DEBUG (g_free (tmp));
tty_fd = -1;
@@ -1480,7 +1480,7 @@
/* Response given was not correct. Give up with a protocol error */
DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG,
- "%s: Protocol error: message type is %d", G_GNUC_FUNCTION, type));
+ "%s: Protocol error: message type is %d", G_STRFUNC, type));
res = GNOME_VFS_ERROR_PROTOCOL_ERROR;
} else {
/* Everything's A-OK. Set up the connection and go */
@@ -1571,13 +1571,13 @@
hash_name = g_strdup (host_name);
DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG,
- "%s: Getting connection to %s", G_GNUC_FUNCTION, hash_name));
+ "%s: Getting connection to %s", G_STRFUNC, hash_name));
*connection = g_hash_table_lookup (sftp_connection_table, hash_name);
if (*connection == NULL) {
DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG,
- "%s: Connection not found. Opening new one.", G_GNUC_FUNCTION));
+ "%s: Connection not found. Opening new one.", G_STRFUNC));
res = sftp_connect (connection, uri);
@@ -1598,7 +1598,7 @@
#if 0
else if (!g_mutex_trylock ((*connection)->mutex)) {
DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG,
- "%s: Connection found but locked. Opening new one.", G_GNUC_FUNCTION));
+ "%s: Connection found but locked. Opening new one.", G_STRFUNC));
res = sftp_connect (connection, uri);
g_mutex_lock ((*connection)->mutex);
@@ -1609,13 +1609,13 @@
#endif
else {
DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Connection found. Locking",
- G_GNUC_FUNCTION));
+ G_STRFUNC));
g_mutex_lock ((*connection)->mutex);
sftp_connection_ref ((*connection));
DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Lock acquired",
- G_GNUC_FUNCTION));
+ G_STRFUNC));
g_free (hash_name);
res = GNOME_VFS_OK;
@@ -1657,25 +1657,25 @@
if (cond != G_IO_IN) return TRUE;
- DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Enter", G_GNUC_FUNCTION));
+ DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Enter", G_STRFUNC));
io_status = g_io_channel_read_line (channel, &str, NULL, NULL, &error);
switch (io_status) {
case G_IO_STATUS_ERROR:
DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG,
- "%s: Could not read error message: %s", G_GNUC_FUNCTION, error->message));
+ "%s: Could not read error message: %s", G_STRFUNC, error->message));
*status = GNOME_VFS_ERROR_IO;
break;
case G_IO_STATUS_EOF:
DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG,
- "%s: Subprocess closed the connection", G_GNUC_FUNCTION));
+ "%s: Subprocess closed the connection", G_STRFUNC));
*status = GNOME_VFS_ERROR_EOF;
return FALSE;
case G_IO_STATUS_AGAIN:
- DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: No error", G_GNUC_FUNCTION));
+ DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: No error", G_STRFUNC));
*status = GNOME_VFS_OK;
break;
@@ -1689,7 +1689,7 @@
str = str1;
DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG,
- "%s: Error message was %s", G_GNUC_FUNCTION, str));
+ "%s: Error message was %s", G_STRFUNC, str));
}
}
@@ -1720,7 +1720,7 @@
g_return_val_if_fail (conn != NULL, 0);
id = conn->msg_id++;
- DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Message id %d", G_GNUC_FUNCTION, id));
+ DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Message id %d", G_STRFUNC, id));
return id;
}
@@ -1816,12 +1816,12 @@
buffer_free (&msg);
*realpath = NULL;
DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Bad status (%d).",
- G_GNUC_FUNCTION, status));
+ G_STRFUNC, status));
return sftp_status_to_vfs_result (status);
}
else if (recv_id != id || type != SSH2_FXP_NAME) {
DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Bad message id or type (%d, %d).",
- G_GNUC_FUNCTION, recv_id, type));
+ G_STRFUNC, recv_id, type));
buffer_free (&msg);
return GNOME_VFS_ERROR_PROTOCOL_ERROR;
}
@@ -1830,13 +1830,13 @@
if (count == 0) {
DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: File not found: %s",
- G_GNUC_FUNCTION, path));
+ G_STRFUNC, path));
buffer_free (&msg);
return GNOME_VFS_ERROR_NOT_FOUND;
}
else if (count != 1) {
DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Bad count (%d).",
- G_GNUC_FUNCTION, count));
+ G_STRFUNC, count));
buffer_free (&msg);
return GNOME_VFS_ERROR_PROTOCOL_ERROR;
}
@@ -1871,7 +1871,7 @@
gint sftp_handle_len;
gchar *path;
- DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Enter", G_GNUC_FUNCTION));
+ DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Enter", G_STRFUNC));
res = sftp_get_connection (&conn, uri);
if (res != GNOME_VFS_OK) return res;
@@ -1912,7 +1912,7 @@
sftp_connection_unlock (conn);
- DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Exit", G_GNUC_FUNCTION));
+ DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Exit", G_STRFUNC));
return GNOME_VFS_OK;
} else {
*method_handle = NULL;
@@ -1922,7 +1922,7 @@
sftp_connection_unref (conn);
sftp_connection_unlock (conn);
- DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Exit", G_GNUC_FUNCTION));
+ DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Exit", G_STRFUNC));
return res;
}
}
@@ -1949,7 +1949,7 @@
guint sftp_handle_len;
gchar *path;
- DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Enter", G_GNUC_FUNCTION));
+ DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Enter", G_STRFUNC));
res = sftp_get_connection (&conn, uri);
if (res != GNOME_VFS_OK) return res;
@@ -1997,7 +1997,7 @@
sftp_connection_unlock (conn);
- DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Exit", G_GNUC_FUNCTION));
+ DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Exit", G_STRFUNC));
return GNOME_VFS_OK;
} else {
*method_handle = NULL;
@@ -2007,7 +2007,7 @@
sftp_connection_unref (conn);
sftp_connection_unlock (conn);
- DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Exit", G_GNUC_FUNCTION));
+ DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Exit", G_STRFUNC));
return res;
}
}
@@ -2024,7 +2024,7 @@
guint i;
- DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Enter", G_GNUC_FUNCTION));
+ DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Enter", G_STRFUNC));
handle = SFTP_OPEN_HANDLE (method_handle);
@@ -2052,7 +2052,7 @@
g_free (handle->path);
g_free (handle);
- DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Exit", G_GNUC_FUNCTION));
+ DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Exit", G_STRFUNC));
return status;
}
@@ -2087,7 +2087,7 @@
struct ReadRequest *read_req;
- DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Enter", G_GNUC_FUNCTION));
+ DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Enter", G_STRFUNC));
got_eof = FALSE;
@@ -2120,7 +2120,7 @@
DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG,
"%s: (%d) Sending read request %d, length %d, pointer %p",
- G_GNUC_FUNCTION, req_ptr, read_req[req_ptr].id,
+ G_STRFUNC, req_ptr, read_req[req_ptr].id,
read_req[req_ptr].req_len, read_req[req_ptr].ptr));
outstanding++;
@@ -2159,7 +2159,7 @@
if (req_svc == req_ptr) { /* Didn't find the id -- unexpected reply */
DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Unexpected id %d",
- G_GNUC_FUNCTION, recv_id));
+ G_STRFUNC, recv_id));
buffer_free (&msg);
g_free (read_req);
sftp_connection_unlock (handle->connection);
@@ -2171,14 +2171,14 @@
status = buffer_read_gint32 (&msg);
DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Got status message %d",
- G_GNUC_FUNCTION, status));
+ G_STRFUNC, status));
DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: req_svc = %d, req_ptr = %d",
- G_GNUC_FUNCTION, req_svc, req_ptr));
+ G_STRFUNC, req_svc, req_ptr));
if (status != SSH2_FX_EOF) {
DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: status return %d",
- G_GNUC_FUNCTION, sftp_status_to_vfs_result (status)));
+ G_STRFUNC, sftp_status_to_vfs_result (status)));
buffer_free (&msg);
g_free (read_req);
sftp_connection_unlock (handle->connection);
@@ -2238,7 +2238,7 @@
buffer_free (&msg);
g_free (read_req);
- DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Exit", G_GNUC_FUNCTION));
+ DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Exit", G_STRFUNC));
sftp_connection_unlock (handle->connection);
@@ -2274,7 +2274,7 @@
struct WriteRequest *write_req;
- DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Enter", G_GNUC_FUNCTION));
+ DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Enter", G_STRFUNC));
handle = SFTP_OPEN_HANDLE (method_handle);
@@ -2303,7 +2303,7 @@
DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG,
"%s: (%d) Sending write request %d, length %d, offset %d",
- G_GNUC_FUNCTION, req_ptr, write_req[req_ptr].id,
+ G_STRFUNC, req_ptr, write_req[req_ptr].id,
write_req[req_ptr].req_len, write_req[req_ptr].offset));
buffer_clear (&msg);
@@ -2351,7 +2351,7 @@
if (req_svc == req_ptr) { /* Didn't find the id -- unexpected reply */
DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Unexpected id %d",
- G_GNUC_FUNCTION, recv_id));
+ G_STRFUNC, recv_id));
buffer_free (&msg);
g_free (write_req);
sftp_connection_unlock (handle->connection);
@@ -2372,7 +2372,7 @@
buffer_free (&msg);
g_free (write_req);
- DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Exit", G_GNUC_FUNCTION));
+ DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Exit", G_STRFUNC));
sftp_connection_unlock (handle->connection);
@@ -2390,7 +2390,7 @@
GnomeVFSFileInfo file_info;
GnomeVFSResult res;
- DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Enter", G_GNUC_FUNCTION));
+ DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Enter", G_STRFUNC));
handle = SFTP_OPEN_HANDLE (method_handle);
@@ -2414,7 +2414,7 @@
break;
}
- DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Exit", G_GNUC_FUNCTION));
+ DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Exit", G_STRFUNC));
return GNOME_VFS_OK;
}
@@ -2426,12 +2426,12 @@
{
SftpOpenHandle *handle;
- DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Enter", G_GNUC_FUNCTION));
+ DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Enter", G_STRFUNC));
handle = SFTP_OPEN_HANDLE (method_handle);
*offset_return = handle->offset;
- DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Exit", G_GNUC_FUNCTION));
+ DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Exit", G_STRFUNC));
return GNOME_VFS_OK;
}
@@ -2446,12 +2446,12 @@
unsigned int id;
char *ret;
- DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Enter", G_GNUC_FUNCTION));
+ DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Enter", G_STRFUNC));
id = sftp_connection_get_id (connection);
DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Requesting symlink target for %s",
- G_GNUC_FUNCTION, path));
+ G_STRFUNC, path));
buffer_init (&msg);
buffer_write_gchar (&msg, SSH2_FXP_READLINK);
@@ -2469,7 +2469,7 @@
ret = NULL;
if (recv_id != id)
- g_critical ("%s: ID mismatch (%u != %u)", G_GNUC_FUNCTION, recv_id, id);
+ g_critical ("%s: ID mismatch (%u != %u)", G_STRFUNC, recv_id, id);
else if (type == SSH2_FXP_NAME) {
int count;
@@ -2478,20 +2478,20 @@
ret = buffer_read_string (&msg, NULL);
DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG,
"%s: Symlink resolved to %s",
- G_GNUC_FUNCTION, ret));
+ G_STRFUNC, ret));
} else {
DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG,
"%s: Readlink failed, got unexpected filename count (%d, 1 expected)",
- G_GNUC_FUNCTION, count));
+ G_STRFUNC, count));
}
} else if (type == SSH2_FXP_STATUS) {
DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG,
"%s: Readlink failed, SSH2_FXP_STATUS response",
- G_GNUC_FUNCTION));
+ G_STRFUNC));
} else {
DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG,
"%s: Readlink failed, bad response (%d)",
- G_GNUC_FUNCTION, type));
+ G_STRFUNC, type));
}
buffer_free (&msg);
@@ -2549,11 +2549,11 @@
GnomeVFSResult res;
unsigned int id;
- DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Enter", G_GNUC_FUNCTION));
+ DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Enter", G_STRFUNC));
if (conn->version == 0) { /* SSH2_FXP_STAT_VERSION_0 doesn't allow our symlink semantics */
DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Server with protocol version 0 detected, LSTAT unsupported.",
- G_GNUC_FUNCTION));
+ G_STRFUNC));
return GNOME_VFS_ERROR_NOT_SUPPORTED;
}
@@ -2574,7 +2574,7 @@
DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG,
"%s: Got GNOME_VFS_FILE_INFO_FOLLOW_LINKS, encountered symlink, resolving.",
- G_GNUC_FUNCTION));
+ G_STRFUNC));
followed_symlinks = 0;
@@ -2592,7 +2592,7 @@
if (++followed_symlinks > MAX_SYMLINKS_FOLLOWED) {
DEBUG2 (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG,
"%s: Too many symlinks while resolving %s.",
- G_GNUC_FUNCTION, target_path));
+ G_STRFUNC, target_path));
res = GNOME_VFS_ERROR_TOO_MANY_LINKS;
/* we signal failure but still fill the file_info as good as we can.
* Is this allowed? */
@@ -2603,12 +2603,12 @@
DEBUG2 (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG,
"%s: Resolved %s to %s",
- G_GNUC_FUNCTION, target_path != NULL ? target_path : path, next_target_reference));
+ G_STRFUNC, target_path != NULL ? target_path : path, next_target_reference));
if (next_target_reference == NULL) {
DEBUG2 (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG,
"%s: Resultion of %s to %s failed, target probably nonexistant.",
- G_GNUC_FUNCTION, target_path, next_target_reference));
+ G_STRFUNC, target_path, next_target_reference));
break;
}
@@ -2626,7 +2626,7 @@
(target_info->valid_fields & GNOME_VFS_FILE_INFO_FIELDS_TYPE) == 0) {
DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG,
"%s: Resultion of %s to %s failed, could not get file info.",
- G_GNUC_FUNCTION, target_path, next_target_reference));
+ G_STRFUNC, target_path, next_target_reference));
res = GNOME_VFS_OK;
break;
}
@@ -2641,7 +2641,7 @@
if (target_info->type != GNOME_VFS_FILE_TYPE_SYMBOLIC_LINK) {
DEBUG2 (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG,
"%s: Aborting symlink resolution, %s is no symlink.",
- G_GNUC_FUNCTION, target_path));
+ G_STRFUNC, target_path));
break;
}
@@ -2651,7 +2651,7 @@
DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG,
"%s: Resolved %s -> %s",
- G_GNUC_FUNCTION, path, target_path));
+ G_STRFUNC, path, target_path));
if (last_valid_target_info != NULL) {
gnome_vfs_file_info_clear (file_info);
@@ -2672,7 +2672,7 @@
update_mime_type_and_name_from_path (file_info, path, options);
- DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Exit", G_GNUC_FUNCTION));
+ DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Exit", G_STRFUNC));
return res;
}
@@ -2688,7 +2688,7 @@
GnomeVFSResult res;
char *path;
- DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Enter (no exit notify)", G_GNUC_FUNCTION));
+ DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Enter (no exit notify)", G_STRFUNC));
res = sftp_get_connection (&conn, uri);
if (res != GNOME_VFS_OK) return res;
@@ -2712,7 +2712,7 @@
{
SftpOpenHandle *handle;
- DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Enter (no exit notify)", G_GNUC_FUNCTION));
+ DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Enter (no exit notify)", G_STRFUNC));
handle = SFTP_OPEN_HANDLE (method_handle);
@@ -2746,7 +2746,7 @@
guint id, sftp_handle_len;
gchar *path;
- DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Enter", G_GNUC_FUNCTION));
+ DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Enter", G_STRFUNC));
res = sftp_get_connection (&conn, uri);
if (res != GNOME_VFS_OK) return res;
@@ -2755,7 +2755,7 @@
URI_TO_PATH (uri, path);
- DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Opening %s", G_GNUC_FUNCTION, path));
+ DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Opening %s", G_STRFUNC, path));
buffer_init (&msg);
buffer_write_gchar (&msg, SSH2_FXP_OPENDIR);
@@ -2767,7 +2767,7 @@
res = iobuf_read_handle (conn->in_fd, &sftp_handle, id, &sftp_handle_len);
- DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Result is %d", G_GNUC_FUNCTION, res));
+ DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Result is %d", G_STRFUNC, res));
if (res == GNOME_VFS_OK) {
handle = g_new0 (SftpOpenHandle, 1);
@@ -2785,8 +2785,8 @@
sftp_connection_unlock (conn);
DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Opened directory %p",
- G_GNUC_FUNCTION, handle));
- DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Exit", G_GNUC_FUNCTION));
+ G_STRFUNC, handle));
+ DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Exit", G_STRFUNC));
return GNOME_VFS_OK;
} else {
/* For some reason, some servers report EOF when the directory doesn't exist. *shrug* */
@@ -2799,7 +2799,7 @@
sftp_connection_unlock (conn);
*method_handle = NULL;
- DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Exit", G_GNUC_FUNCTION));
+ DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Exit", G_STRFUNC));
return res;
}
}
@@ -2824,25 +2824,25 @@
Buffer msg;
gchar type;
- DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Enter", G_GNUC_FUNCTION));
+ DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Enter", G_STRFUNC));
handle = SFTP_OPEN_HANDLE (method_handle);
DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Reading directory %p",
- G_GNUC_FUNCTION, handle));
+ G_STRFUNC, handle));
if (handle->info_read_ptr < handle->info_write_ptr) {
DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Found directory entry %s in cache",
- G_GNUC_FUNCTION, handle->info[handle->info_read_ptr].name));
+ G_STRFUNC, handle->info[handle->info_read_ptr].name));
gnome_vfs_file_info_copy (file_info, &(handle->info[handle->info_read_ptr++]));
- DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Exit", G_GNUC_FUNCTION));
+ DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Exit", G_STRFUNC));
return GNOME_VFS_OK;
}
sftp_connection_lock (handle->connection);
- DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: No entries in cache", G_GNUC_FUNCTION));
+ DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: No entries in cache", G_STRFUNC));
id = sftp_connection_get_id (handle->connection);
@@ -2872,12 +2872,12 @@
if (status == SSH2_FX_EOF || SSH2_FX_OK) {
DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG,
"%s: End of directory reached (EOF status)",
- G_GNUC_FUNCTION));
+ G_STRFUNC));
sftp_connection_unlock (handle->connection);
return GNOME_VFS_ERROR_EOF;
} else {
DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Error status %d",
- G_GNUC_FUNCTION, status));
+ G_STRFUNC, status));
do_close (method, method_handle, context);
sftp_connection_unlock (handle->connection);
return sftp_status_to_vfs_result (status);
@@ -2888,13 +2888,13 @@
if (count == 0) {
DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG,
"%s: End of directory reached (count 0)",
- G_GNUC_FUNCTION));
+ G_STRFUNC));
buffer_free (&msg);
sftp_connection_unlock (handle->connection);
return GNOME_VFS_ERROR_EOF;
}
- DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Count is %d", G_GNUC_FUNCTION, count));
+ DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Count is %d", G_STRFUNC, count));
if (handle->info_write_ptr + count > handle->info_alloc) {
if (handle->info_read_ptr > 0) {
@@ -2928,7 +2928,7 @@
buffer_read_file_info (&msg, info);
DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: %d, filename is %s",
- G_GNUC_FUNCTION, i, filename));
+ G_STRFUNC, i, filename));
if (info->valid_fields & GNOME_VFS_FILE_INFO_FIELDS_TYPE &&
info->type == GNOME_VFS_FILE_TYPE_SYMBOLIC_LINK) {
@@ -2940,7 +2940,7 @@
update_mime_type_and_name_from_path (info, filename, handle->dir_options);
DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: %d, MIME type is %s",
- G_GNUC_FUNCTION, i, info->mime_type));
+ G_STRFUNC, i, info->mime_type));
g_free (filename);
g_free (longname);
@@ -2949,7 +2949,7 @@
}
} else {
DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Got wrong packet type (%d)",
- G_GNUC_FUNCTION, type));
+ G_STRFUNC, type));
buffer_free (&msg);
sftp_connection_unlock (handle->connection);
return GNOME_VFS_ERROR_PROTOCOL_ERROR;
@@ -2964,11 +2964,11 @@
g_free (handle->info[handle->info_read_ptr].mime_type);
handle->info[handle->info_read_ptr].mime_type = NULL;
handle->info_read_ptr++;
- DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Exit", G_GNUC_FUNCTION));
+ DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Exit", G_STRFUNC));
sftp_connection_unlock (handle->connection);
return GNOME_VFS_OK;
} else {
- DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Exit", G_GNUC_FUNCTION));
+ DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Exit", G_STRFUNC));
sftp_connection_unlock (handle->connection);
return GNOME_VFS_ERROR_EOF;
}
@@ -3238,7 +3238,7 @@
guint id;
gchar *path;
- DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Enter", G_GNUC_FUNCTION));
+ DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Enter", G_STRFUNC));
if ((mask & ~(GNOME_VFS_SET_FILE_INFO_NAME |
GNOME_VFS_SET_FILE_INFO_PERMISSIONS |
@@ -3270,7 +3270,7 @@
if (res == GNOME_VFS_OK && (mask & GNOME_VFS_SET_FILE_INFO_NAME))
res = do_rename (method, uri, info->name, context);
- DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Exit: %d", G_GNUC_FUNCTION, res));
+ DEBUG (g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: Exit: %d", G_STRFUNC, res));
return res;
}
Modified: trunk/modules/smb-method.c
==============================================================================
--- trunk/modules/smb-method.c (original)
+++ trunk/modules/smb-method.c Mon Jan 28 12:56:58 2008
@@ -168,8 +168,8 @@
#endif
#ifdef DEBUG_SMB_LOCKS
-#define LOCK_SMB() {g_mutex_lock (smb_lock); g_print ("LOCK %s\n", G_GNUC_PRETTY_FUNCTION);}
-#define UNLOCK_SMB() {g_print ("UNLOCK %s\n", G_GNUC_PRETTY_FUNCTION); g_mutex_unlock (smb_lock);}
+#define LOCK_SMB() {g_mutex_lock (smb_lock); g_print ("LOCK %s\n", G_STRFUNC);}
+#define UNLOCK_SMB() {g_print ("UNLOCK %s\n", G_STRFUNC); g_mutex_unlock (smb_lock);}
#else
#define LOCK_SMB() g_mutex_lock (smb_lock)
#define UNLOCK_SMB() g_mutex_unlock (smb_lock)
@@ -319,7 +319,7 @@
* sure when we'll be called */
if (!g_mutex_trylock (smb_lock))
return TRUE;
- DEBUG_SMB(("LOCK %s\n", G_GNUC_PRETTY_FUNCTION));
+ DEBUG_SMB(("LOCK %s\n", G_STRFUNC));
size = g_hash_table_size (server_cache);
servers = g_ptr_array_sized_new (size);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]