Subject: [netatalk-admins] movieplayer and such with afpd
From: a sun (asun@zoology.washington.edu)
Date: Tue Nov 25 1997 - 22:16:44 EST
i finally decided to figure out why movieplayer didn't like playing
stuff from an afpd volume. it turns out that file locking was being
done incorrectly. here's a synopsis of the fix which will be in my a18
patchset. if i get motiviated, i might even include fnctl()-based
byte-range locks.
the following check in afp_openfork() isn't correct:
if (access & ( OPENACC_WR|OPENACC_DRD )) { /* exclusive lock */
lockop = LOCK_EX;
} else if (access & ( OPENACC_RD|OPENACC_DWR ))
the above will actually match either of the two perm bits instead of
both of them. the obvious fix is of course:
if ( (access & ( OPENACC_WR|OPENACC_DRD )) ==
(OPENACC_WR | OPENACC_DRD)) { /* exclusive lock */
lockop = LOCK_EX;
} else if ( (access & ( OPENACC_RD|OPENACC_DWR )) ==
(OPENACC_RD | OPENACC_DWR)) { /* shared lock */
This archive was generated by hypermail 2b28 : Sat Dec 18 1999 - 16:28:17 EST