]> arthur.barton.de Git - netatalk.git/blobdiff - libatalk/adouble/ad_flush.c
Fixes
[netatalk.git] / libatalk / adouble / ad_flush.c
index 9c9c3891d522aaeca8259902f24a440c305d8e7b..3af59d909c81448bc664f5a777162965eabd0507 100644 (file)
@@ -184,16 +184,13 @@ int ad_flush(struct adouble *ad)
  * Close a struct adouble freeing all resources
  *
  * This close the whole thing, regardless of what you pass in adflags!
+ * When open forks are using this struct adouble (ad_refcount>0) the close
+ * request is ignored.
  */
 int ad_close( struct adouble *ad, int adflags)
 {
     int err = 0;
 
-    if (ad->ad_inited == AD_CLOSED) {
-        LOG(log_warning, logtype_default, "ad_close: double close");
-        return 0;
-    }
-
     LOG(log_debug, logtype_default, "ad_close(\"%s\", %s)",
         cfrombstr(ad->ad_fullpath),
         adflags2logstr(adflags));
@@ -236,7 +233,5 @@ int ad_close( struct adouble *ad, int adflags)
         ad->ad_fullpath = NULL;
     }
 
-    ad->ad_inited = AD_CLOSED;
-
     return err;
 }