From 379685bfcaa4dffd707b932574c99f0bab33b83e Mon Sep 17 00:00:00 2001 From: Laxmikant Rashinkar Date: Tue, 24 Sep 2013 17:19:10 -0700 Subject: FUSE: we now process only one opendir command at a time --- sesman/chansrv/devredir.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'sesman/chansrv/devredir.c') diff --git a/sesman/chansrv/devredir.c b/sesman/chansrv/devredir.c index 418c29e7..1f9eb492 100644 --- a/sesman/chansrv/devredir.c +++ b/sesman/chansrv/devredir.c @@ -68,7 +68,7 @@ #define log_info(_params...) \ { \ - if (LOG_INFO <= LOG_LEVEL) \ + if (LOG_INFO <= LOG_LEVEL) \ { \ g_write("[%10.10u]: DEV_REDIR %s: %d : ", \ g_time3(), __func__, __LINE__); \ @@ -78,7 +78,7 @@ #define log_debug(_params...) \ { \ - if (LOG_DEBUG <= LOG_LEVEL) \ + if (LOG_DEBUG <= LOG_LEVEL) \ { \ g_write("[%10.10u]: DEV_REDIR %s: %d : ", \ g_time3(), __func__, __LINE__); \ @@ -1101,7 +1101,11 @@ dev_redir_file_open(void *fusep, tui32 device_id, char *path, #if 1 /* without the 0x00000010 rdesktop opens files in */ /* O_RDONLY instead of O_RDWR mode */ - DesiredAccess = DA_FILE_READ_DATA | DA_FILE_WRITE_DATA | DA_SYNCHRONIZE | 0x00000010; + if (mode & O_RDWR) + DesiredAccess = DA_FILE_READ_DATA | DA_FILE_WRITE_DATA | DA_SYNCHRONIZE | 0x00000010; + else + DesiredAccess = DA_FILE_READ_DATA | DA_SYNCHRONIZE; + CreateOptions = CO_FILE_SYNCHRONOUS_IO_NONALERT; CreateDisposition = CD_FILE_OPEN; // WAS 1 #else -- cgit v1.2.1