X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=index%2Flocksrv.c;h=e19bc425b2372e57b5989d882bc55f2c4085122b;hb=cc9f94a61cbd9dcc0df0cf7d0c7c41d2cec88189;hp=10cf88194d109bafce008ae0331014ab13ff0651;hpb=eb2b742588ce07fb4516bbca22c93b938b13e433;p=idzebra-moved-to-github.git diff --git a/index/locksrv.c b/index/locksrv.c index 10cf881..e19bc42 100644 --- a/index/locksrv.c +++ b/index/locksrv.c @@ -4,7 +4,14 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: locksrv.c,v $ - * Revision 1.14 2000-03-15 15:00:30 adam + * Revision 1.16 2001-10-29 22:16:38 adam + * Server unlocks both "cmt" and "org" lock in zebra_server_unlock. + * + * Revision 1.15 2000/12/01 17:59:08 adam + * Fixed bug regarding online updates on WIN32. + * When zebra.cfg is not available the server will not abort. + * + * Revision 1.14 2000/03/15 15:00:30 adam * First work on threaded version. * * Revision 1.13 1999/05/26 07:49:13 adam @@ -71,7 +78,6 @@ int zebra_server_lock_init (ZebraService zi) { char path_prefix[1024]; - assert (zi->res); zi->server_lock_cmt = NULL; zi->server_lock_org = NULL; @@ -132,16 +138,10 @@ void zebra_server_unlock (ZebraService zi, int commitPhase) { if (zi->server_lock_org == NULL) return; - if (commitPhase) - { - logf (LOG_DEBUG, "Server unlocks org"); - zebra_unlock (zi->server_lock_org); - } - else - { - logf (LOG_DEBUG, "Server unlocks cmt"); - zebra_unlock (zi->server_lock_cmt); - } + logf (LOG_DEBUG, "Server unlocks org"); + zebra_unlock (zi->server_lock_org); + logf (LOG_DEBUG, "Server unlocks cmt"); + zebra_unlock (zi->server_lock_cmt); } int zebra_server_lock_get_state (ZebraService zi, time_t *timep) @@ -156,7 +156,7 @@ int zebra_server_lock_get_state (ZebraService zi, time_t *timep) if (stat (path, &xstat) == -1) *timep = 1; else - *timep = xstat.st_ctime; + *timep = xstat.st_mtime; strcpy (path, zi->server_path_prefix); strcat (path, FNAME_MAIN_LOCK);