X-Git-Url: https://git.openafs.org/?p=openafs.git;a=blobdiff_plain;f=src%2Fafs%2Fafs_fetchstore.c;h=66793d1a9ef4bd474229d973a0f9b263330957fc;hp=17bf1bc767dff445442816f028b496e010bfc254;hb=334114ac58b0039ae90d7e29fa2f019fe068bd79;hpb=beb57af06ff9d20aa8d038f6d3474b62922c41b4 diff --git a/src/afs/afs_fetchstore.c b/src/afs/afs_fetchstore.c index 17bf1bc..66793d1 100644 --- a/src/afs/afs_fetchstore.c +++ b/src/afs/afs_fetchstore.c @@ -319,20 +319,14 @@ afs_CacheStoreProc(register struct afs_conn *tc, int *nomoreP) { afs_int32 code = 0; - afs_uint32 tlen; struct storeOps *ops; void * rock = NULL; - struct osi_file *fP; - int *shouldwake; int nomore = *nomoreP; - struct dcache *tdc; - int stored = 0; unsigned int i; - afs_int32 alen; #ifndef AFS_NOSTATS struct afs_stats_xferData *xferP; /* Ptr to this op's xfer struct */ osi_timeval_t xferStartTime, /*FS xfer start time */ - xferStopTime; /*FS xfer stop time */ + xferStopTime; /*FS xfer stop time */ afs_size_t bytesToXfer = 10000; /* # bytes to xfer */ afs_size_t bytesXferred = 10000; /* # bytes actually xferred */ #endif /* AFS_NOSTATS */ @@ -344,9 +338,12 @@ afs_CacheStoreProc(register struct afs_conn *tc, } for (i = 0; i < nchunks && !code; i++) { + int stored = 0; + struct osi_file *fP; int offset = 0; - tdc = dclist[i]; - alen = tdc->f.chunkBytes; + struct dcache *tdc = dclist[i]; + afs_int32 alen = tdc->f.chunkBytes; + int *shouldwake; if (!tdc) { afs_warn("afs: missing dcache!\n"); storeallmissing++; @@ -387,7 +384,8 @@ afs_CacheStoreProc(register struct afs_conn *tc, osi_GetuTime(&xferStartTime); #endif /* AFS_NOSTATS */ - while ( alen > 0 ) { + while ( alen > 0 ) { + afs_uint32 tlen; afs_int32 bytesread, byteswritten; code = (*ops->prepare)(rock, alen, &tlen); if ( code )