aboutsummaryrefslogtreecommitdiff
path: root/sshfs.c
diff options
context:
space:
mode:
authorMiklos Szeredi <miklos@szeredi.hu>2007-05-15 20:09:29 +0000
committerMiklos Szeredi <miklos@szeredi.hu>2007-05-15 20:09:29 +0000
commit15f911853e8166ee951810f7dfa75e3f10eb2c68 (patch)
treec9e57aaeffd76b65b61b08815c3cee730403b519 /sshfs.c
parenteff16314282d683e0b6f6e8abfc0f51091eebce2 (diff)
downloadsshfs-15f911853e8166ee951810f7dfa75e3f10eb2c68.tar
sshfs-15f911853e8166ee951810f7dfa75e3f10eb2c68.tar.gz
sshfs-15f911853e8166ee951810f7dfa75e3f10eb2c68.tar.bz2
sshfs-15f911853e8166ee951810f7dfa75e3f10eb2c68.zip
fixes
Diffstat (limited to 'sshfs.c')
-rw-r--r--sshfs.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/sshfs.c b/sshfs.c
index b20d6e1..cc168da 100644
--- a/sshfs.c
+++ b/sshfs.c
@@ -1817,8 +1817,11 @@ static int sshfs_open_common(const char *path, mode_t mode,
buf_add_path(&buf, path);
err2 = sftp_request(sshfs.follow_symlinks ? SSH_FXP_STAT : SSH_FXP_LSTAT,
&buf, SSH_FXP_ATTRS, &outbuf);
- if (!err2 && buf_get_attrs(&outbuf, &stbuf, NULL) == -1)
- err2 = -EIO;
+ if (!err2) {
+ if (buf_get_attrs(&outbuf, &stbuf, NULL) == -1)
+ err2 = -EIO;
+ buf_free(&outbuf);
+ }
err = sftp_request_wait(open_req, SSH_FXP_OPEN, SSH_FXP_HANDLE,
&sf->handle);
if (!err && err2) {
@@ -2605,6 +2608,8 @@ int main(int argc, char *argv[])
char *base_path;
const char *sftp_server;
+ g_thread_init(NULL);
+
sshfs.blksize = 4096;
sshfs.max_read = 65536;
sshfs.nodelay_workaround = 1;