New setting lockPath: directory of various lock files.
authorAdam Dickmeiss <adam@indexdata.dk>
Tue, 26 Mar 1996 16:01:13 +0000 (16:01 +0000)
committerAdam Dickmeiss <adam@indexdata.dk>
Tue, 26 Mar 1996 16:01:13 +0000 (16:01 +0000)
index/index.h
index/lockidx.c
index/lockutil.c
index/main.c
index/zserver.c

index 212b385..e8750d2 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: index.h,v $
- * Revision 1.36  1996-03-21 14:50:09  adam
+ * Revision 1.37  1996-03-26 16:01:13  adam
+ * New setting lockPath: directory of various lock files.
+ *
+ * Revision 1.36  1996/03/21  14:50:09  adam
  * File update uses modify-time instead of change-time.
  *
  * Revision 1.35  1996/02/12  18:45:36  adam
@@ -188,6 +191,7 @@ void dir_free (struct dir_entry **e_p);
 void repositoryUpdate (struct recordGroup *rGroup);
 void repositoryAdd (struct recordGroup *rGroup);
 void repositoryDelete (struct recordGroup *rGroup);
+void repositoryShow (struct recordGroup *rGroup);
 
 void key_open (int mem);
 int key_close (void);
index dad7181..2c59bdd 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: lockidx.c,v $
- * Revision 1.5  1995-12-13 08:46:09  adam
+ * Revision 1.6  1996-03-26 16:01:13  adam
+ * New setting lockPath: directory of various lock files.
+ *
+ * Revision 1.5  1995/12/13  08:46:09  adam
  * Locking uses F_WRLCK and F_RDLCK again!
  *
  * Revision 1.4  1995/12/12  16:00:57  adam
@@ -50,7 +53,7 @@ int zebraIndexWait (int commitPhase)
 
     if (server_lock_cmt == -1)
     {
-        sprintf (path, "%s%s", FNAME_COMMIT_LOCK, pathPrefix);
+        sprintf (path, "%s%s", pathPrefix, FNAME_COMMIT_LOCK);
         if ((server_lock_cmt = open (path, O_CREAT|O_RDWR|O_SYNC, 0666))
             == -1)
         {
@@ -62,7 +65,7 @@ int zebraIndexWait (int commitPhase)
         zebraUnlock (server_lock_cmt);
     if (server_lock_org == -1)
     {
-        sprintf (path, "%s%s", FNAME_ORG_LOCK, pathPrefix);
+        sprintf (path, "%s%s", pathPrefix, FNAME_ORG_LOCK);
         if ((server_lock_org = open (path, O_CREAT|O_RDWR|O_SYNC, 0666))
             == -1)
         {
index 7b83a52..d59067f 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: lockutil.c,v $
- * Revision 1.4  1995-12-13 08:46:10  adam
+ * Revision 1.5  1996-03-26 16:01:13  adam
+ * New setting lockPath: directory of various lock files.
+ *
+ * Revision 1.4  1995/12/13  08:46:10  adam
  * Locking uses F_WRLCK and F_RDLCK again!
  *
  * Revision 1.3  1995/12/12  16:00:57  adam
@@ -37,7 +40,7 @@ static char *lockDir = NULL;
 void zebraLockPrefix (char *pathPrefix)
 {
     if (!lockDir)
-        lockDir = res_get_def (common_resource, "lockDir", "");
+        lockDir = res_get_def (common_resource, "lockPath", "");
     assert (lockDir);
     
     strcpy (pathPrefix, lockDir);
index 1a3fc76..f957daf 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: main.c,v $
- * Revision 1.37  1996-03-19 12:43:26  adam
+ * Revision 1.38  1996-03-26 16:01:14  adam
+ * New setting lockPath: directory of various lock files.
+ *
+ * Revision 1.37  1996/03/19  12:43:26  adam
  * Bug fix: File update traversal didn't handle trailing slashes correctly.
  * Bug fix: Update of sub directory groups wasn't handled correctly.
  *
@@ -215,6 +218,7 @@ int main (int argc, char **argv)
                         exit (1);
                     }
                     data1_tabpath = res_get (common_resource, "profilePath");
+                    bf_lockDir (res_get (common_resource, "lockPath"));
                 }
                 if (!strcmp (arg, "update"))
                     cmd = 'u';
index 6d61dc3..88a90a4 100644 (file)
@@ -4,7 +4,10 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: zserver.c,v $
- * Revision 1.34  1996-03-20 09:36:46  adam
+ * Revision 1.35  1996-03-26 16:01:14  adam
+ * New setting lockPath: directory of various lock files.
+ *
+ * Revision 1.34  1996/03/20  09:36:46  adam
  * Function dict_lookup_grep got extra parameter, init_pos, which marks
  * from which position in pattern approximate pattern matching should occur.
  * Approximate pattern matching is used in relevance=re-2.
@@ -224,8 +227,9 @@ bend_initresult *bend_init (bend_initrequest *q)
             logf (LOG_FATAL, "Cannot open resource `%s'", sob->configname);
             exit (1);
         }
+        bf_lockDir (res_get (common_resource, "lockPath"));
+        data1_tabpath = res_get(common_resource, "profilePath");
     }
-    data1_tabpath = res_get(common_resource, "profilePath");
     server_info.sets = NULL;
     server_info.registerState = -1;  /* trigger open of registers! */
     server_info.registerChange = 0;