Silas Boyd-Wickizer <[EMAIL PROTECTED]> once said:
> The fid offset is getting incremented on ixp_pwrite and 
> incremented twice on ixp_write.  I believe the attached patch is 
> a fix.

You're write but your patch isn't the best solution. I like
this approach more because we don't deal with f->offset
at all in _pwrite, only after it returns.

diff -r 70ea59334d41 libixp/client.c
--- a/libixp/client.c   Mon Nov 05 23:52:11 2007 +0900
+++ b/libixp/client.c   Thu Nov 22 02:13:44 2007 -0800
@@ -424,13 +424,13 @@ _pwrite(IxpCFid *f, void *buf, long coun
                n = min(count-len, f->iounit);
                fcall.type = TWrite;
                fcall.fid = f->fid;
-               fcall.offset = f->offset;
+               fcall.offset = offset;
                fcall.data = buf + len;
                fcall.count = n;
                if(dofcall(f->client, &fcall) == 0)
                        return -1;
 
-               f->offset += fcall.count;
+               offset += fcall.count;
                len += fcall.count;
 
                ixp_freefcall(&fcall);

Reply via email to