diff options
author | Miklos Szeredi <miklos@szeredi.hu> | 2005-11-23 13:13:42 +0000 |
---|---|---|
committer | Miklos Szeredi <miklos@szeredi.hu> | 2005-11-23 13:13:42 +0000 |
commit | aa44e0154931c4027635096f4e5bfa1392008f91 (patch) | |
tree | a49d3c45ffa9d81f0417194bd399a85571c845b0 /sshfs.c | |
parent | e916cdd6331950fa04a1cea216e4fc5f8b61d625 (diff) | |
download | sshfs-aa44e0154931c4027635096f4e5bfa1392008f91.tar sshfs-aa44e0154931c4027635096f4e5bfa1392008f91.tar.gz sshfs-aa44e0154931c4027635096f4e5bfa1392008f91.tar.bz2 sshfs-aa44e0154931c4027635096f4e5bfa1392008f91.zip |
fix
Diffstat (limited to 'sshfs.c')
-rw-r--r-- | sshfs.c | 17 |
1 files changed, 9 insertions, 8 deletions
@@ -842,11 +842,12 @@ static void *process_requests(void *data_) break; pthread_mutex_lock(&lock); - req = (struct request *) g_hash_table_lookup(reqtab, (gpointer) id); + req = (struct request *) g_hash_table_lookup(reqtab, + GUINT_TO_POINTER(id)); if (req == NULL) fprintf(stderr, "request %i not found\n", id); else - g_hash_table_remove(reqtab, (gpointer) id); + g_hash_table_remove(reqtab, GUINT_TO_POINTER(id)); pthread_mutex_unlock(&lock); if (req != NULL) { struct timeval now; @@ -854,8 +855,8 @@ static void *process_requests(void *data_) gettimeofday(&now, NULL); difftime = (now.tv_sec - req->start.tv_sec) * 1000; difftime += (now.tv_usec - req->start.tv_usec) / 1000; - DEBUG(" [%05i] %14s %8ibytes (%ims)\n", id, type_name(type), - buf.size+5, difftime); + DEBUG(" [%05i] %14s %8ubytes (%ims)\n", id, type_name(type), + (unsigned) buf.size + 5, difftime); req->reply = buf; req->reply_type = type; req->replied = 1; @@ -924,8 +925,8 @@ static int sftp_init() static void sftp_detect_uid() { int flags; - int id = sftp_get_id(); - int replid; + uint32_t id = sftp_get_id(); + uint32_t replid; uint8_t type; struct buffer buf; struct stat stbuf; @@ -1049,13 +1050,13 @@ static int sftp_request_common(uint8_t type, const struct buffer *buf, pthread_mutex_unlock(&lock); goto out; } - g_hash_table_insert(reqtab, (gpointer) id, req); + g_hash_table_insert(reqtab, GUINT_TO_POINTER(id), req); gettimeofday(&req->start, NULL); DEBUG("[%05i] %s\n", id, type_name(type)); err = -EIO; if (sftp_send(type, &buf2) == -1) { - g_hash_table_remove(reqtab, (gpointer) id); + g_hash_table_remove(reqtab, GUINT_TO_POINTER(id)); pthread_mutex_unlock(&lock); goto out; } |