Return both error codes for rxfs_fetchInit
authorSimon Wilkinson <sxw@inf.ed.ac.uk>
Mon, 19 Oct 2009 22:56:12 +0000 (23:56 +0100)
committerDerrick Brashear <shadow|account-1000005@unknown>
Mon, 19 Oct 2009 23:40:25 +0000 (16:40 -0700)
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 <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

src/afs/afs_fetchstore.c

index 7b9bf05..e72d749 100644 (file)
@@ -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;