]> arthur.barton.de Git - netatalk.git/blobdiff - libatalk/adouble/ad_lock.c
Fixes
[netatalk.git] / libatalk / adouble / ad_lock.c
index b78e22dea7ae96332eb0a93114bed4bccf41a224..6961930d4e3925babc3d8e4c26e0d78dd8506e9b 100644 (file)
@@ -462,7 +462,7 @@ int ad_lock(struct adouble *ad, uint32_t eid, int locktype, off_t off, off_t len
             }
         }
     } else { /* rfork */
-        switch (ad->ad_flags) {
+        switch (ad->ad_vers) {
         case AD_VERSION2:
             if (ad_meta_fileno(ad) == -1 || ad_reso_fileno(ad) == -1) {
                 /* there's no meta data. return a lock error 
@@ -682,7 +682,7 @@ void ad_unlock(struct adouble *ad, const int fork)
  */
 int ad_testlock(struct adouble *ad, int eid, const off_t off)
 {
-    switch (ad->ad_flags) {
+    switch (ad->ad_vers) {
     case AD_VERSION2:
         return ad_testlock_v2(ad, eid, off);
     case AD_VERSION_EA:
@@ -706,7 +706,7 @@ int ad_testlock(struct adouble *ad, int eid, const off_t off)
  */
 uint16_t ad_openforks(struct adouble *ad, uint16_t attrbits)
 {
-    switch (ad->ad_flags) {
+    switch (ad->ad_vers) {
     case AD_VERSION2:
         return ad_openforks_v2(ad, attrbits);
     case AD_VERSION_EA: