From: Simon Wilkinson Date: Mon, 19 Oct 2009 22:56:12 +0000 (+0100) Subject: Return both error codes for rxfs_fetchInit X-Git-Tag: openafs-devel-1_5_66~38 X-Git-Url: http://git.openafs.org/?p=openafs.git;a=commitdiff_plain;h=3eec9fa7700de5d20a5c7eec8fc02f87ead1f342 Return both error codes for rxfs_fetchInit The FetchStore refactoring was causing the result from rx_EndCall to be discarded. This change will cause that to be returned to the caller if rx_Error() returns 0 Reviewed-on: http://gerrit.openafs.org/687 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear --- diff --git a/src/afs/afs_fetchstore.c b/src/afs/afs_fetchstore.c index 7b9bf05..e72d749 100644 --- a/src/afs/afs_fetchstore.c +++ b/src/afs/afs_fetchstore.c @@ -871,7 +871,7 @@ rxfs_fetchInit(struct afs_conn *tc, struct vcache *avc, afs_offs_t base, struct osi_file *fP, struct fetchOps **ops, void **rock) { struct rxfs_fetchVariables *v; - int code = 0, code1; + int code = 0, code1 = 0; #ifdef AFS_64BIT_CLIENT afs_uint32 length_hi = 0; #endif @@ -969,6 +969,10 @@ rxfs_fetchInit(struct afs_conn *tc, struct vcache *avc, afs_offs_t base, #endif /* AFS_64BIT_CLIENT */ } else code = -1; + + if (!code && code1) + code = code1; + if (code) { osi_FreeSmallSpace(v); return code;