From: Adam Dickmeiss Date: Mon, 16 Oct 2000 20:16:00 +0000 (+0000) Subject: Fixed problem with close of lock file for WIN32. X-Git-Tag: ZEBRA.1.1~58 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=7149e5607a0d473d958ed1758728cc343b56d681;p=idzebra-moved-to-github.git Fixed problem with close of lock file for WIN32. --- diff --git a/index/lockidx.c b/index/lockidx.c index 20ece01..26af684 100644 --- a/index/lockidx.c +++ b/index/lockidx.c @@ -4,7 +4,10 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: lockidx.c,v $ - * Revision 1.19 2000-09-05 14:04:05 adam + * Revision 1.20 2000-10-16 20:16:00 adam + * Fixed problem with close of lock file for WIN32. + * + * Revision 1.19 2000/09/05 14:04:05 adam * Updates for prefix 'yaz_' for YAZ log functions. * * Revision 1.18 2000/02/24 11:00:07 adam @@ -177,9 +180,15 @@ void zebraIndexUnlock (void) zebra_lock_prefix (common_resource, path); strcat (path, FNAME_MAIN_LOCK); +#ifdef WIN32 + zebra_lock_destroy (server_lock_main); + if (unlink (path) && errno != ENOENT) + logf (LOG_WARN|LOG_ERRNO, "unlink %s failed", path); +#else if (unlink (path) && errno != ENOENT) logf (LOG_WARN|LOG_ERRNO, "unlink %s failed", path); zebra_lock_destroy (server_lock_main); +#endif server_lock_main = 0; }