code = rx_WritevAlloc(acall, tiov, &tnio, RX_MAXIOVECS, tlen);
RX_AFS_GLOCK();
if (code <= 0) {
+ code = rx_Error(acall);
osi_FreeSmallSpace(tiov);
- return -33;
+ return code ? code : -33;
}
tlen = code;
code = afs_MemReadvBlk(mceP, offset, tiov, tnio, tlen);
(*abytesXferredP) += code;
#endif /* AFS_NOSTATS */
if (code != tlen) {
+ code = rx_Error(acall);
osi_FreeSmallSpace(tiov);
- return -33;
+ return code ? code : -33;
}
offset += tlen;
alen -= tlen;
do {
tc = afs_Conn(&avc->fid, areq, SHARED_LOCK);
if (tc) {
- RX_AFS_GUNLOCK();
retry:
+ RX_AFS_GUNLOCK();
tcall = rx_NewCall(tc->id);
RX_AFS_GLOCK();
/* Set the client mod time since we always want the file
#endif /* AFS_64BIT_CLIENT */
if (code == 0) {
code = EndRXAFS_StoreData(tcall, &OutStatus, &tsync);
-#ifdef AFS_64BIT_CLIENT
- if (code == RXGEN_OPCODE) {
- afs_serverSetNo64Bit(tc);
- code = rx_EndCall(tcall, code);
- goto retry;
- }
-#endif /* AFS_64BIT_CLIENT */
}
code = rx_EndCall(tcall, code);
RX_AFS_GLOCK();
XSTATS_END_TIME;
+#ifdef AFS_64BIT_CLIENT
+ if (code == RXGEN_OPCODE && !afs_serverHasNo64Bit(tc)) {
+ afs_serverSetNo64Bit(tc);
+ goto retry;
+ }
+#endif /* AFS_64BIT_CLIENT */
} else
code = -1;
} while (afs_Analyze
shouldwake, &lp1, &lp2);
#endif /* AFS_NOSTATS */
afs_CFileClose(tfile);
-#ifdef AFS_64BIT_CLIENT
- if (code == RXGEN_OPCODE) {
- afs_serverSetNo64Bit(tc);
- goto restart;
- }
-#endif /* AFS_64BIT_CLIENT */
if ((tdc->f.chunkBytes < afs_OtherCSize)
- && (i < (nchunks - 1))) {
+ && (i < (nchunks - 1)) && code == 0) {
int bsent, tlen, sbytes =
afs_OtherCSize - tdc->f.chunkBytes;
char *tbuffer =
if (code2)
code = code2;
}
+#ifdef AFS_64BIT_CLIENT
+ if (code == RXGEN_OPCODE && !afs_serverHasNo64Bit(tc)) {
+ afs_serverSetNo64Bit(tc);
+ goto restart;
+ }
+#endif /* AFS_64BIT_CLIENT */
} while (afs_Analyze
(tc, code, &avc->fid, areq,
AFS_STATS_FS_RPCIDX_STOREDATA, SHARED_LOCK,