aboutsummaryrefslogtreecommitdiff
path: root/sshfs.c
diff options
context:
space:
mode:
authorMiklos Szeredi <miklos@szeredi.hu>2007-04-18 09:44:08 +0000
committerMiklos Szeredi <miklos@szeredi.hu>2007-04-18 09:44:08 +0000
commit4399cfca84e9250aec1d78a2719857c054631a63 (patch)
tree0929b0000d9ff10243ddaeb43e4ff952469783b2 /sshfs.c
parentdd258a5117550bd3195bd5b41fdb53b0116d3749 (diff)
downloadsshfs-4399cfca84e9250aec1d78a2719857c054631a63.tar
sshfs-4399cfca84e9250aec1d78a2719857c054631a63.tar.gz
sshfs-4399cfca84e9250aec1d78a2719857c054631a63.tar.bz2
sshfs-4399cfca84e9250aec1d78a2719857c054631a63.zip
Fix crash within gdb
Diffstat (limited to 'sshfs.c')
-rw-r--r--sshfs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sshfs.c b/sshfs.c
index 38176e3..b20d6e1 100644
--- a/sshfs.c
+++ b/sshfs.c
@@ -1299,7 +1299,7 @@ static int sftp_request_wait(struct request *req, uint8_t type,
err = req->error;
goto out;
}
- sem_wait(&req->ready);
+ while (sem_wait(&req->ready));
if (req->error) {
err = req->error;
goto out;
@@ -2021,7 +2021,7 @@ static void submit_read(struct sshfs_file *sf, size_t size, off_t offset,
static int wait_chunk(struct read_chunk *chunk, char *buf, size_t size)
{
int res;
- sem_wait(&chunk->ready);
+ while (sem_wait(&chunk->ready));
res = chunk->res;
if (res > 0) {
if ((size_t) res > size)