From 88d48fdfa040774186998d2e318ae69b11591884 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Wed, 29 Nov 2000 15:21:31 +0000 Subject: [PATCH] Fixed problem with passwd db. --- index/zebraapi.c | 27 +++++++++++++++------------ recctrl/recgrs.c | 6 +++++- 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/index/zebraapi.c b/index/zebraapi.c index 0b79bc8..577b99a 100644 --- a/index/zebraapi.c +++ b/index/zebraapi.c @@ -3,7 +3,10 @@ * All rights reserved. * * $Log: zebraapi.c,v $ - * Revision 1.39 2000-11-29 14:24:01 adam + * 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 * Script configure uses yaz pthreads options. Added locking for * zebra_register_{lock,unlock}. * @@ -299,6 +302,17 @@ ZebraService zebra_start (const char *configName) zebra_chdir (zh); zebra_server_lock_init (zh); zebra_mutex_cond_init (&zh->session_lock); + if (!res_get (zh->res, "passwd")) + zh->passwd_db = NULL; + else + { + zh->passwd_db = passwd_db_open (); + if (!zh->passwd_db) + logf (LOG_WARN|LOG_ERRNO, "passwd_db_open failed"); + else + passwd_db_file (zh->passwd_db, res_get (zh->res, "passwd")); + } + return zh; } @@ -345,17 +359,6 @@ static int zebra_register_activate (ZebraService zh, int rw) zebraRankInstall (zh, rank1_class); - if (!res_get (zh->res, "passwd")) - zh->passwd_db = NULL; - else - { - zh->passwd_db = passwd_db_open (); - if (!zh->passwd_db) - logf (LOG_WARN|LOG_ERRNO, "passwd_db_open failed"); - else - passwd_db_file (zh->passwd_db, res_get (zh->res, "passwd")); - } - if (!(zh->records = rec_open (zh->bfs, rw, 0))) { logf (LOG_WARN, "rec_open"); diff --git a/recctrl/recgrs.c b/recctrl/recgrs.c index 87e6186..9e13697 100644 --- a/recctrl/recgrs.c +++ b/recctrl/recgrs.c @@ -4,7 +4,10 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: recgrs.c,v $ - * Revision 1.34 2000-02-25 13:24:49 adam + * Revision 1.35 2000-11-29 15:21:31 adam + * Fixed problem with passwd db. + * + * Revision 1.34 2000/02/25 13:24:49 adam * Fixed bug regarding pointer conversion that showed up on OSF V5. * * Revision 1.33 1999/11/30 13:48:04 adam @@ -575,6 +578,7 @@ static int grs_retrieve(void *clientData, struct recRetrieveCtrl *p) nmem_destroy (mem); return 0; } + data1_pr_tree (p->dh, node, stdout); logf (LOG_DEBUG, "grs_retrieve: size"); if ((dnew = data1_insert_taggeddata(p->dh, node, node, "size", mem))) -- 1.7.10.4