

Fix a very stupid but important bug that didn't update the file pointer after
a jwrite() or jwritev().



---

 cur-root/libjio.c |   10 ++++++++++
 1 files changed, 10 insertions(+)

diff -puN libjio.c~jwrite_filep libjio.c
--- cur/libjio.c~jwrite_filep	2004-04-01 22:10:01.000000000 -0300
+++ cur-root/libjio.c	2004-04-01 22:16:41.000000000 -0300
@@ -554,6 +554,11 @@ ssize_t jwrite(struct jfs *fs, void *buf
 	ts.len = count;
 	
 	rv = jtrans_commit(&ts);
+
+	if (rv >= 0) {
+		/* if success, advance the file pointer */
+		lseek(fs->fd, count, SEEK_CUR);
+	}
 	
 	pthread_mutex_unlock(&(fs->lock));
 	return rv;
@@ -616,6 +621,11 @@ ssize_t jwritev(struct jfs *fs, struct i
 	ts.len = sum;
 	
 	rv = jtrans_commit(&ts);
+
+	if (rv >= 0) {
+		/* if success, advance the file pointer */
+		lseek(fs->fd, count, SEEK_CUR);
+	}
 	
 	pthread_mutex_unlock(&(fs->lock));
 	return rv;

_
