]> arthur.barton.de Git - netatalk.git/commitdiff
afpd: Return the correct error for non-existent volume
authorRoss Lagerwall <rosslagerwall@gmail.com>
Sun, 31 Aug 2014 07:14:24 +0000 (08:14 +0100)
committerRalph Boehme <rb@sernet.de>
Tue, 2 Sep 2014 14:00:00 +0000 (16:00 +0200)
Return kFPObjectNotFound rather than kFPParamErr when openvol() is
called with a non-existent volume.  This follows the specification and
Apple's implementation.

Signed-off-by: Ross Lagerwall <rosslagerwall@gmail.com>
Reviewed-by: Ralph Boehme <rb@sernet.de>
etc/afpd/volume.c

index 3a057dbcb006e8458699de9e3a23098dcd06768e..8fca00067aad13e1bde15d08d8bd8a508ac94bbf 100644 (file)
@@ -746,7 +746,7 @@ int afp_openvol(AFPObj *obj, char *ibuf, size_t ibuflen _U_, char *rbuf, size_t
     }
 
     if ( volume == NULL ) {
-        return AFPERR_PARAM;
+        return AFPERR_NOOBJ;
     }
 
     /* check for a volume password */