* 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));
ad->ad_fullpath = NULL;
}
- ad->ad_inited = AD_CLOSED;
-
return err;
}