From 3eec9fa7700de5d20a5c7eec8fc02f87ead1f342 Mon Sep 17 00:00:00 2001 From: Simon Wilkinson Date: Mon, 19 Oct 2009 23:56:12 +0100 Subject: [PATCH] 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 --- src/afs/afs_fetchstore.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/afs/afs_fetchstore.c b/src/afs/afs_fetchstore.c index 7b9bf05b8..e72d749f7 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; -- 2.39.5