From: Adam Dickmeiss Date: Mon, 20 Nov 1995 16:59:44 +0000 (+0000) Subject: New update method: the 'old' keys are saved for each records. X-Git-Tag: ZEBRA.1.0~674 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=ea01436a957572aaaa878b59469a4cedce7e5e21;p=idzebra-moved-to-github.git New update method: the 'old' keys are saved for each records. --- diff --git a/index/Makefile b/index/Makefile index 673a076..16ed4e3 100644 --- a/index/Makefile +++ b/index/Makefile @@ -1,14 +1,14 @@ # Copyright (C) 1995, Index Data I/S # All rights reserved. # Sebastian Hammer, Adam Dickmeiss -# $Id: Makefile,v 1.20 1995-11-20 11:56:21 adam Exp $ +# $Id: Makefile,v 1.21 1995-11-20 16:59:44 adam Exp $ SHELL=/bin/sh RANLIB=ranlib -YAZLIB=-lyaz -YAZINC= -OSILIB=../../xtimosi/src/libmosi.a -lrfc +YAZLIB=../../yaz/lib/libyaz.a +YAZINC=-I../../yaz/include +OSILIB=../../xtimosi/src/libmosi.a ../../yaz/lib/librfc.a #NETLIB=-lnsl -lsocket INCLUDE=-I../include $(YAZINC) diff --git a/index/dir.c b/index/dir.c index bc88bfb..cd80bff 100644 --- a/index/dir.c +++ b/index/dir.c @@ -4,7 +4,10 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: dir.c,v $ - * Revision 1.10 1995-11-20 11:56:22 adam + * Revision 1.11 1995-11-20 16:59:44 adam + * New update method: the 'old' keys are saved for each records. + * + * Revision 1.10 1995/11/20 11:56:22 adam * Work on new traversal. * * Revision 1.9 1995/10/30 13:42:12 adam @@ -83,11 +86,10 @@ struct dir_entry *dir_open (const char *rep) { struct dir_entry *entry_n; - entry_n = xmalloc (sizeof(*entry) * (entry_max + 1000)); + entry_n = xmalloc (sizeof(*entry) * (entry_max += 1000)); memcpy (entry_n, entry, idx * sizeof(*entry)); xfree (entry); entry = entry_n; - entry_max += 100; } strcpy (path + pathpos, dent->d_name); stat (path, &finfo); @@ -112,6 +114,7 @@ struct dir_entry *dir_open (const char *rep) } entry[idx].name = NULL; closedir (dir); + logf (LOG_LOG, "dir_close"); return entry; } diff --git a/index/dirs.c b/index/dirs.c index ce6da3f..2e69cf8 100644 --- a/index/dirs.c +++ b/index/dirs.c @@ -4,7 +4,10 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: dirs.c,v $ - * Revision 1.2 1995-11-20 11:56:23 adam + * Revision 1.3 1995-11-20 16:59:45 adam + * New update method: the 'old' keys are saved for each records. + * + * Revision 1.2 1995/11/20 11:56:23 adam * Work on new traversal. * * Revision 1.1 1995/11/17 15:54:42 adam @@ -97,7 +100,7 @@ struct dirs_info *dirs_open (Dict dict, const char *rep) struct dirs_entry *dirs_read (struct dirs_info *p) { - int before = 0, after = p->no_max; + int before = 0, after = p->no_max+1; if (p->no_read < p->no_cur) { @@ -107,10 +110,6 @@ struct dirs_entry *dirs_read (struct dirs_info *p) } if (p->no_cur < p->no_max) return p->last_entry = NULL; -#if 0 - strcpy (p->nextpath, p->prefix); - strcat (p->nextpath, (p->entries + p->no_max-1)->path); -#endif p->no_cur = -1; logf (LOG_DEBUG, "dirs_read rescan"); dict_scan (p->dict, p->nextpath, &before, &after, p, dirs_client_proc); diff --git a/index/extract.c b/index/extract.c index 9207ab7..bd1b4f0 100644 --- a/index/extract.c +++ b/index/extract.c @@ -4,7 +4,10 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: extract.c,v $ - * Revision 1.26 1995-11-20 11:56:24 adam + * Revision 1.27 1995-11-20 16:59:45 adam + * New update method: the 'old' keys are saved for each records. + * + * Revision 1.26 1995/11/20 11:56:24 adam * Work on new traversal. * * Revision 1.25 1995/11/16 15:34:54 adam @@ -113,13 +116,17 @@ static SYSNO sysno_next; static int key_cmd; static int key_sysno; -static char *key_databaseName; +static const char *key_databaseName; static char **key_buf; static size_t ptr_top; static size_t ptr_i; -static size_t kused; +static size_t key_buf_used; static int key_file_no; +static int key_del_max; +static int key_del_used; +static char *key_del_buf; + void key_open (int mem) { #if !RECORD_BASE @@ -130,9 +137,13 @@ void key_open (int mem) key_buf = xmalloc (mem); ptr_top = mem/sizeof(char*); ptr_i = 0; - kused = 0; + + key_buf_used = 0; key_file_no = 0; + key_del_buf = NULL; + key_del_max = 0; + if (!(file_idx = dict_open (FNAME_FILE_DICT, 40, 1))) { logf (LOG_FATAL, "dict_open fail of %s", "fileidx"); @@ -259,7 +270,7 @@ void key_flush (void) } logf (LOG_LOG, "finished section %d", key_file_no); ptr_i = 0; - kused = 0; + key_buf_used = 0; } int key_close (void) @@ -273,6 +284,10 @@ int key_close (void) dict_insert (file_idx, ".", sizeof(sysno_next), &sysno_next); #endif dict_close (file_idx); + + xfree (key_del_buf); + key_del_buf = NULL; + key_del_max = 0; return key_file_no; } @@ -288,28 +303,69 @@ static void wordAdd (const RecWord *p) struct it_key key; size_t i; - if (kused + 1024 > (ptr_top-ptr_i)*sizeof(char*)) + if (key_buf_used + 1024 > (ptr_top-ptr_i)*sizeof(char*)) key_flush (); ++ptr_i; - key_buf[ptr_top-ptr_i] = (char*)key_buf + kused; - kused += index_word_prefix ((char*)key_buf + kused, + key_buf[ptr_top-ptr_i] = (char*)key_buf + key_buf_used; + key_buf_used += index_word_prefix ((char*)key_buf + key_buf_used, p->attrSet, p->attrUse, key_databaseName); switch (p->which) { case Word_String: for (i = 0; p->u.string[i]; i++) - ((char*)key_buf) [kused++] = index_char_cvt (p->u.string[i]); - ((char*)key_buf) [kused++] = '\0'; + ((char*)key_buf) [key_buf_used++] = + index_char_cvt (p->u.string[i]); + ((char*)key_buf) [key_buf_used++] = '\0'; break; default: return ; } - ((char*) key_buf)[kused++] = ((key_cmd == 'a') ? 1 : 0); + ((char*) key_buf)[key_buf_used++] = ((key_cmd == 'a') ? 1 : 0); key.sysno = key_sysno; key.seqno = p->seqno; - memcpy ((char*)key_buf + kused, &key, sizeof(key)); - kused += sizeof(key); + memcpy ((char*)key_buf + key_buf_used, &key, sizeof(key)); + key_buf_used += sizeof(key); + + if (key_cmd == 'a' && key_del_used >= 0) + { + char attrSet; + short attrUse; + if (key_del_used + 1024 > key_del_max) + { + char *kbn; + + if (!(kbn = malloc (key_del_max += 64000))) + { + logf (LOG_FATAL, "malloc"); + exit (1); + } + if (key_del_buf) + memcpy (kbn, key_del_buf, key_del_used); + free (key_del_buf); + key_del_buf = kbn; + } + switch (p->which) + { + case Word_String: + for (i = 0; p->u.string[i]; i++) + ((char*)key_del_buf) [key_del_used++] = p->u.string[i]; + ((char*)key_del_buf) [key_del_used++] = '\0'; + break; + default: + return ; + } + attrSet = p->attrSet; + memcpy (key_del_buf + key_del_used, &attrSet, sizeof(attrSet)); + key_del_used += sizeof(attrSet); + + attrUse = p->attrUse; + memcpy (key_del_buf + key_del_used, &attrUse, sizeof(attrUse)); + key_del_used += sizeof(attrUse); + + memcpy (key_del_buf + key_del_used, &p->seqno, sizeof(p->seqno)); + key_del_used += sizeof(p->seqno); + } } static void wordAddAny (const RecWord *p) @@ -326,9 +382,6 @@ static void wordAddAny (const RecWord *p) wordAdd (p); } - -#define FILE_READ_BUF 1 -#if FILE_READ_BUF static char *file_buf; static int file_offset; static int file_bufsize; @@ -389,12 +442,7 @@ static int file_read (int fd, char *buf, size_t count) file_offset += count; return count; } -#else -static int file_read (int fd, char *buf, size_t count) -{ - return read (fd, buf, count); -} -#endif + SYSNO file_extract (int cmd, const char *fname, const char *kname, char *databaseName) { @@ -407,6 +455,7 @@ SYSNO file_extract (int cmd, const char *fname, const char *kname, struct recExtractCtrl extractCtrl; RecType rt; + key_del_used = -1; key_databaseName = databaseName; for (i = strlen(fname); --i >= 0; ) if (fname[i] == '/') @@ -433,10 +482,9 @@ SYSNO file_extract (int cmd, const char *fname, const char *kname, sysno = rec->sysno; dict_insert (file_idx, kname, sizeof(sysno), &sysno); - rec->info[0] = rec_strdup (file_type); - rec->info[1] = rec_strdup (kname); - rec_put (records, rec); - rec_rm (rec); + rec->info[0] = rec_strdup (file_type, &rec->size[0]); + rec->info[1] = rec_strdup (kname, &rec->size[1]); + rec_put (records, &rec); #else sysno = sysno_next++; dict_insert (file_idx, kname, sizeof(sysno), &sysno); @@ -456,18 +504,149 @@ SYSNO file_extract (int cmd, const char *fname, const char *kname, extractCtrl.subType = ""; extractCtrl.init = wordInit; extractCtrl.add = wordAddAny; -#if FILE_READ_BUF + file_read_start (extractCtrl.fd); -#endif + extractCtrl.readf = file_read; key_sysno = sysno; key_cmd = cmd; r = (*rt->extract)(&extractCtrl); -#if FILE_READ_BUF + file_read_stop (extractCtrl.fd); -#endif + close (extractCtrl.fd); if (r) logf (LOG_WARN, "Couldn't extract file %s, code %d", fname, r); return sysno; } + +int fileExtract (SYSNO *sysno, const char *fname, const char *databaseName, + int deleteFlag) +{ + int i, r; + char ext[128]; + char ext_res[128]; + const char *file_type; + struct recExtractCtrl extractCtrl; + RecType rt; + Record rec; + + logf (LOG_DEBUG, "fileExtractAdd %s", fname); + + key_del_used = 0; + for (i = strlen(fname); --i >= 0; ) + if (fname[i] == '/') + { + strcpy (ext, ""); + break; + } + else if (fname[i] == '.') + { + strcpy (ext, fname+i+1); + break; + } + sprintf (ext_res, "fileExtension.%s", ext); + if (!(file_type = res_get (common_resource, ext_res))) + return 0; + if (!(rt = recType_byName (file_type))) + return 0; + + if ((extractCtrl.fd = open (fname, O_RDONLY)) == -1) + { + logf (LOG_WARN|LOG_ERRNO, "open %s", fname); + return 0; + } + + extractCtrl.subType = ""; + extractCtrl.init = wordInit; + extractCtrl.add = wordAddAny; + + if (! *sysno) + { + logf (LOG_LOG, "add record %s", fname); + rec = rec_new (records); + *sysno = rec->sysno; + rec->info[0] = rec_strdup (file_type, &rec->size[0]); + rec->info[1] = rec_strdup (fname, &rec->size[1]); + rec->info[3] = rec_strdup (databaseName, &rec->size[3]); + } + else + { + size_t off; + char *kb; + + if (deleteFlag) + logf (LOG_LOG, "delete record %s", fname); + else + logf (LOG_LOG, "update record %s", fname); + rec = rec_get (records, *sysno); + + key_cmd = 'd'; + key_sysno = *sysno; + key_databaseName = rec->info[3]; + kb = rec->info[2]; + for (off = 0; off < rec->size[2]; ) + { + RecWord rw; + char attrSet; + short attrUse; + + rw.which = Word_String; + rw.u.string = kb + off; + while (kb[off]) + off++; + off++; + memcpy (&attrSet, kb + off, sizeof(attrSet)); + off += sizeof(attrSet); + memcpy (&attrUse, kb + off, sizeof(attrUse)); + off += sizeof(attrUse); + memcpy (&rw.seqno, kb + off, sizeof(rw.seqno)); + off += sizeof(rw.seqno); + rw.attrSet = attrSet; + rw.attrUse = attrUse; + + (*extractCtrl.add) (&rw); + } + assert (off == rec->size[2]); + free (rec->info[2]); + rec->info[2] = NULL; + rec->size[2] = 0; + + free (rec->info[3]); + rec->info[3] = rec_strdup (databaseName, &rec->size[3]); + } + + if (deleteFlag) + { +#if 0 + rec_del (records, *sysno); + rec_rm (&rec); +#endif + return 1; + } + + key_databaseName = databaseName; + key_sysno = *sysno; + key_cmd = 'a'; + + file_read_start (extractCtrl.fd); + extractCtrl.readf = file_read; + r = (*rt->extract)(&extractCtrl); + file_read_stop (extractCtrl.fd); + + close (extractCtrl.fd); + if (r) + { + rec_rm (&rec); + logf (LOG_WARN, "Couldn't extract file %s, code %d", fname, r); + return 0; + } + if (key_del_used > 0) + { + rec->size[2] = key_del_used; + rec->info[2] = malloc (rec->size[2]); + memcpy (rec->info[2], key_del_buf, rec->size[2]); + } + rec_put (records, &rec); + return 1; +} diff --git a/index/index.h b/index/index.h index 7989608..025c256 100644 --- a/index/index.h +++ b/index/index.h @@ -4,7 +4,10 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: index.h,v $ - * Revision 1.22 1995-11-20 11:56:26 adam + * Revision 1.23 1995-11-20 16:59:45 adam + * New update method: the 'old' keys are saved for each records. + * + * Revision 1.22 1995/11/20 11:56:26 adam * Work on new traversal. * * Revision 1.21 1995/11/16 15:34:55 adam @@ -84,7 +87,7 @@ #define IT_KEY_HAVE_FIELD 0 struct it_key { - int sysno; + int sysno; int seqno; }; @@ -99,7 +102,7 @@ struct dir_entry { struct dirs_entry { enum dirsKind kind; char path[256]; - int sysno; + SYSNO sysno; int ctime; }; @@ -151,5 +154,7 @@ void strtab_del (struct strtab *t, void *data); int index_char_cvt (int c); int index_word_prefix (char *string, int attset_ordinal, - int local_attribute, char *databaseName); + int local_attribute, const char *databaseName); +int fileExtract (SYSNO *sysno, const char *fname, const char *databaseName, + int deleteFlag); diff --git a/index/kcompare.c b/index/kcompare.c index b5b3b63..878f491 100644 --- a/index/kcompare.c +++ b/index/kcompare.c @@ -4,7 +4,10 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: kcompare.c,v $ - * Revision 1.14 1995-10-30 15:08:08 adam + * Revision 1.15 1995-11-20 16:59:46 adam + * New update method: the 'old' keys are saved for each records. + * + * Revision 1.14 1995/10/30 15:08:08 adam * Bug fixes. * * Revision 1.13 1995/10/27 14:00:11 adam @@ -125,7 +128,7 @@ int index_char_cvt (int c) int index_word_prefix (char *string, int attset_ordinal, int local_attribute, - char *databaseName) + const char *databaseName) { int i; sprintf (string, "%s@%c%04d", databaseName, diff --git a/index/recindex.c b/index/recindex.c index 6b8f1f7..bdd134c 100644 --- a/index/recindex.c +++ b/index/recindex.c @@ -4,7 +4,10 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: recindex.c,v $ - * Revision 1.3 1995-11-16 15:34:55 adam + * Revision 1.4 1995-11-20 16:59:46 adam + * New update method: the 'old' keys are saved for each records. + * + * Revision 1.3 1995/11/16 15:34:55 adam * Uses new record management system in both indexer and server. * * Revision 1.2 1995/11/15 19:13:08 adam @@ -66,13 +69,17 @@ struct record_index_entry { #define REC_HEAD_MAGIC "rechead" -char *rec_strdup (const char *s) +char *rec_strdup (const char *s, size_t *len) { char *p; if (!s) + { + *len = 0; return NULL; - p = malloc (strlen(s)+1); + } + *len = strlen(s)+1; + p = malloc (*len); if (!p) { logf (LOG_FATAL|LOG_ERRNO, "malloc"); @@ -209,9 +216,9 @@ static void rec_write_single (Records p, Record rec) for (i = 0; i < REC_NO_INFO; i++) if (!rec->info[i]) - size++; + size += sizeof(*rec->size); else - size += strlen(rec->info[i])+1; + size += sizeof(*rec->size) + rec->size[i]; entry.u.used.offset = p->head.data_size; entry.u.used.size = size; @@ -253,13 +260,15 @@ static void rec_write_single (Records p, Record rec) } cptr = p->tmp_buf; for (i = 0; i < REC_NO_INFO; i++) - if (!rec->info[i]) - *cptr++ = '\0'; - else + { + memcpy (cptr, &rec->size[i], sizeof(*rec->size)); + cptr += sizeof(*rec->size); + if (rec->info[i]) { - strcpy (cptr, rec->info[i]); - cptr += strlen(rec->info[i]) + 1; + memcpy (cptr, rec->info[i], rec->size[i]); + cptr += rec->size[i]; } + } for (got = 0; got < entry.u.used.size; got += r) { r = write (p->data_fd, p->tmp_buf + got, entry.u.used.size - got); @@ -279,7 +288,7 @@ static void rec_cache_flush (Records p) struct record_cache_entry *e = p->record_cache + i; if (e->dirty) rec_write_single (p, e->rec); - rec_rm (e->rec); + rec_rm (&e->rec); } p->cache_cur = 0; } @@ -385,16 +394,18 @@ Record rec_get (Records p, int sysno) nptr = p->tmp_buf; for (i = 0; i < REC_NO_INFO; i++) - if (*nptr) + { + memcpy (&rec->size[i], nptr, sizeof(*rec->size)); + nptr += sizeof(*rec->size); + if (rec->size[i]) { - rec->info[i] = rec_strdup (nptr); - nptr += strlen(nptr)+1; + rec->info[i] = malloc (rec->size[i]); + memcpy (rec->info[i], nptr, rec->size[i]); + nptr += rec->size[i]; } else - { - nptr++; rec->info[i] = NULL; - } + } rec_cache_insert (p, rec, 0); return rec; } @@ -423,30 +434,38 @@ Record rec_new (Records p) (p->head.no_records)++; rec->sysno = sysno; for (i = 0; i < REC_NO_INFO; i++) + { rec->info[i] = NULL; + rec->size[i] = 0; + } rec_cache_insert (p, rec, 1); return rec; } -void rec_put (Records p, Record rec) +void rec_put (Records p, Record *recpp) { Record *recp; - if ((recp = rec_cache_lookup (p, rec->sysno, 1))) + if ((recp = rec_cache_lookup (p, (*recpp)->sysno, 1))) { - rec_rm (*recp); - *recp = rec_cp (rec); + rec_rm (recp); + *recp = *recpp; } else - rec_cache_insert (p, rec, 1); + { + rec_cache_insert (p, *recpp, 1); + rec_rm (recpp); + } + *recpp = NULL; } -void rec_rm (Record rec) +void rec_rm (Record *recpp) { int i; for (i = 0; i < REC_NO_INFO; i++) - free (rec->info[i]); - free (rec); + free ((*recpp)->info[i]); + free (*recpp); + *recpp = NULL; } Record rec_cp (Record rec) @@ -461,6 +480,20 @@ Record rec_cp (Record rec) } n->sysno = rec->sysno; for (i = 0; i < REC_NO_INFO; i++) - n->info[i] = rec_strdup (rec->info[i]); + if (!rec->info[i]) + { + n->info[i] = NULL; + n->size[i] = 0; + } + else + { + n->size[i] = rec->size[i]; + if (!(n->info[i] = malloc (rec->size[i]))) + { + logf (LOG_FATAL|LOG_ERRNO, "malloc. rec_cp"); + exit (1); + } + memcpy (n->info[i], rec->info[i], rec->size[i]); + } return n; } diff --git a/index/recindex.h b/index/recindex.h index 474d485..b12fa8e 100644 --- a/index/recindex.h +++ b/index/recindex.h @@ -4,7 +4,10 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: recindex.h,v $ - * Revision 1.2 1995-11-15 19:13:08 adam + * Revision 1.3 1995-11-20 16:59:46 adam + * New update method: the 'old' keys are saved for each records. + * + * Revision 1.2 1995/11/15 19:13:08 adam * Work on record management. * * Revision 1.1 1995/11/15 14:46:21 adam @@ -19,15 +22,16 @@ typedef struct record_info { int sysno; char *info[REC_NO_INFO]; + size_t size[REC_NO_INFO]; } *Record; typedef struct records_info *Records; Record rec_cp (Record rec); -void rec_rm (Record rec); -void rec_put (Records p, Record rec); +void rec_rm (Record *recpp); +void rec_put (Records p, Record *recpp); Record rec_new (Records p); Record rec_get (Records p, int sysno); void rec_close (Records *p); Records rec_open (int rw); -char *rec_strdup (const char *s); +char *rec_strdup (const char *s, size_t *len); diff --git a/index/trav.c b/index/trav.c index faf7571..1b5a094 100644 --- a/index/trav.c +++ b/index/trav.c @@ -4,7 +4,10 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: trav.c,v $ - * Revision 1.7 1995-11-20 11:56:28 adam + * Revision 1.8 1995-11-20 16:59:46 adam + * New update method: the 'old' keys are saved for each records. + * + * Revision 1.7 1995/11/20 11:56:28 adam * Work on new traversal. * * Revision 1.6 1995/11/17 15:54:42 adam @@ -348,7 +351,7 @@ static void repositoryUpdateR (struct dirs_info *di, struct dirs_entry *dst, { int sd; - if (dst && !repComp (dst->path, src, src_len)) + if (dst && !repComp (dst->path, src, src_len+1)) { if (e_src[i_src].name) { @@ -374,11 +377,10 @@ static void repositoryUpdateR (struct dirs_info *di, struct dirs_entry *dst, case dirs_file: if (e_src[i_src].ctime > dst->ctime) { - file_extract ('d', tmppath, tmppath, databaseName); - file_extract ('a', tmppath, tmppath, databaseName); - dirs_add (di, src, dst->sysno, e_src[i_src].ctime); + if (fileExtract (&dst->sysno, tmppath, databaseName, 0)) + dirs_add (di, src, dst->sysno, e_src[i_src].ctime); } - dst = dirs_read (di); + dst = dirs_read (di); break; case dirs_dir: repositoryUpdateR (di, dst, base, src, databaseName); @@ -392,18 +394,20 @@ static void repositoryUpdateR (struct dirs_info *di, struct dirs_entry *dst, } else if (sd > 0) { - SYSNO sysno; + SYSNO sysno = 0; strcpy (src + src_len+1, e_src[i_src].name); sprintf (tmppath, "%s%s", base, src); switch (e_src[i_src].kind) { case dirs_file: - sysno = file_extract ('a', tmppath, tmppath, databaseName); - dirs_add (di, src, sysno, e_src[i_src].ctime); + if (fileExtract (&sysno, tmppath, databaseName, 0)) + dirs_add (di, src, sysno, e_src[i_src].ctime); break; case dirs_dir: repositoryUpdateR (di, dst, base, src, databaseName); + if (dst) + dst = dirs_last (di); break; } i_src++; diff --git a/index/zserver.c b/index/zserver.c index 61d6154..e5ceb5a 100644 --- a/index/zserver.c +++ b/index/zserver.c @@ -4,7 +4,10 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: zserver.c,v $ - * Revision 1.23 1995-11-16 17:00:56 adam + * Revision 1.24 1995-11-20 16:59:47 adam + * New update method: the 'old' keys are saved for each records. + * + * Revision 1.23 1995/11/16 17:00:56 adam * Better logging of rpn query. * * Revision 1.22 1995/11/16 15:34:55 adam @@ -225,7 +228,7 @@ static int record_fetch (ZServerInfo *zi, int sysno, int score, ODR stream, *rec_bufp = msg; *rec_lenp = strlen (msg); #if RECORD_BASE - rec_rm (rec); + rec_rm (&rec); #endif return 0; /* or 14: System error in presenting records */ } @@ -242,7 +245,7 @@ static int record_fetch (ZServerInfo *zi, int sysno, int score, ODR stream, *rec_lenp = retrieveCtrl.rec_len; close (retrieveCtrl.fd); #if RECORD_BASE - rec_rm (rec); + rec_rm (&rec); #endif return retrieveCtrl.diagnostic; }