When zebra.cfg is not available the server will not abort.
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: locksrv.c,v $
- * Revision 1.14 2000-03-15 15:00:30 adam
+ * 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
{
char path_prefix[1024];
- assert (zi->res);
zi->server_lock_cmt = NULL;
zi->server_lock_org = NULL;
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);
* All rights reserved.
*
* $Log: zebraapi.c,v $
- * Revision 1.40 2000-11-29 15:21:31 adam
+ * Revision 1.41 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.40 2000/11/29 15:21:31 adam
* Fixed problem with passwd db.
*
* Revision 1.39 2000/11/29 14:24:01 adam
logf (LOG_LOG, "Register in read/write mode");
else if (zh->service->registerState == state)
{
+ logf (LOG_LOG, "registerChange = %ld lastChange = %ld",
+ (long) zh->service->registerChange, (long)lastChange);
if (zh->service->registerChange >= lastChange)
+ {
return 0;
+ }
logf (LOG_LOG, "Register completely updated since last access");
}
else if (zh->service->registerState == -1)
if (!(zh->res = res_open (zh->configName)))
{
logf (LOG_WARN, "Failed to read resources `%s'", zh->configName);
- return zh;
+// return zh;
}
zebra_chdir (zh);
zebra_server_lock_init (zh);
return ;
yaz_log (LOG_LOG, "zebra_stop");
- assert (!zs->sessions);
+ zebra_mutex_cond_lock (&zs->session_lock);
+ while (zs->sessions)
+ zebra_close (zs->sessions);
+
+ zebra_mutex_cond_unlock (&zs->session_lock);
zebra_mutex_cond_destroy (&zs->session_lock);
# Simple Zebra configuration file
-# $Id: zebra.cfg,v 1.10 1999-12-08 22:11:56 adam Exp $
+# $Id: zebra.cfg,v 1.11 2000-12-01 17:59:08 adam Exp $
#
# Where the schema files, attribute files, etc are located.
profilePath: .:../../tab:../../../yaz/tab
recordtype: grs.sgml
+storekeys: 1
+storedata: 1
+#recordId: (bib1,identifier-standard)
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: res.c,v $
- * Revision 1.27 1999-11-30 13:48:04 adam
+ * Revision 1.28 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.27 1999/11/30 13:48:04 adam
* Improved installation. Updated for inclusion of YAZ header files.
*
* Revision 1.26 1999/10/07 09:48:36 adam
void res_close (Res r)
{
- assert (r);
+ if (!r)
+ return;
if (r->init)
{
struct res_entry *re, *re1;
int l = 0;
int no = 0;
- assert (r);
+ if (!r)
+ return 0;
if (prefix)
l = strlen(prefix);
if (!r->init)