From 75b1e11436fdd324aab7a0cc8ada23f11e5bba28 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Wed, 19 Apr 1995 16:01:57 +0000 Subject: [PATCH] Some hacks to get the FIFO communication work!! Isn't reliable. Resource gw.account added - default account info. --- kernel/Makefile | 8 ++++++-- kernel/default.res | 3 ++- kernel/eti.c | 14 +++++++++++++- kernel/main.c | 8 +++++++- kernel/urp.c | 8 +++++++- 5 files changed, 35 insertions(+), 6 deletions(-) diff --git a/kernel/Makefile b/kernel/Makefile index 6fafa73..2b41f57 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -2,7 +2,11 @@ # Europagate, 1995 # # $Log: Makefile,v $ -# Revision 1.17 1995/04/19 10:46:17 adam +# Revision 1.18 1995/04/19 16:01:57 adam +# Some hacks to get the FIFO communication work!! Isn't reliable. +# Resource gw.account added - default account info. +# +# Revision 1.17 1995/04/19 10:46:17 adam # Persistency works much better now. New command: status - history-like # # Revision 1.16 1995/04/19 07:30:56 adam @@ -63,7 +67,7 @@ SHELL=/bin/sh #ZINC=-I$(ZPRE) #ZLIB=$(ZPRE)/libz3950.a -ZLIB=../../yaz/lib/libyaz.a +ZLIB=../../../quinn/proj/yaz/lib/libyaz.a INCLUDE=-I../include #CFLAGS=-g -Wall diff --git a/kernel/default.res b/kernel/default.res index a16cfd8..e25323f 100644 --- a/kernel/default.res +++ b/kernel/default.res @@ -1,5 +1,5 @@ # Email gateway - general kernel resources -# $Id: default.res,v 1.16 1995/04/19 07:31:00 adam Exp $ +# $Id: default.res,v 1.17 1995/04/19 16:01:57 adam Exp $ # # Important directories, programs, etc. gw.reply.mta: /usr/lib/sendmail @@ -21,6 +21,7 @@ gw.hostname: localhost gw.bibset: default.bib gw.target.loc: loc.res gw.target.drewdb: drewdb.res +gw.target.dimitris: dimitris.res gw.databases: # Language definitions diff --git a/kernel/eti.c b/kernel/eti.c index c36edd8..325e579 100644 --- a/kernel/eti.c +++ b/kernel/eti.c @@ -2,7 +2,11 @@ * Europagate, 1995 * * $Log: eti.c,v $ - * Revision 1.6 1995/04/17 09:34:27 adam + * Revision 1.7 1995/04/19 16:01:57 adam + * Some hacks to get the FIFO communication work!! Isn't reliable. + * Resource gw.account added - default account info. + * + * Revision 1.6 1995/04/17 09:34:27 adam * Timeout (idletime) adjustable. Minor changes in kernel. * * Revision 1.5 1995/03/31 09:43:13 adam @@ -185,13 +189,21 @@ int main (int argc, char **argv) signal (SIGPIPE, pipe_handle); setjmp (retry_jmp); ++pass; + signal (SIGPIPE, pipe_handle); gw_log (GW_LOG_DEBUG, module, "Pass %d", pass); if (pass == 1) r = gipc_open (gip, fifo_server_name, 0); else if (pass == 2) { +#if 0 gipc_close (gip); +#endif + gipc_destroy (gip); + unlink (fifo_server_name); + unlink (fifo_client_name); + gip = gipc_initialize (fifo_client_name); start_kernel (argc, argv, id); + sleep (2); r = gipc_open (gip, fifo_server_name, 1); } else if (pass == 3) diff --git a/kernel/main.c b/kernel/main.c index 7926912..374ca49 100644 --- a/kernel/main.c +++ b/kernel/main.c @@ -2,7 +2,11 @@ * Europagate, 1995 * * $Log: main.c,v $ - * Revision 1.18 1995/04/19 13:19:09 adam + * Revision 1.19 1995/04/19 16:01:58 adam + * Some hacks to get the FIFO communication work!! Isn't reliable. + * Resource gw.account added - default account info. + * + * Revision 1.18 1995/04/19 13:19:09 adam * New command: account - for authentication. * * Revision 1.17 1995/04/19 10:46:18 adam @@ -103,6 +107,7 @@ static void kernel_events (struct str_queue *queue, int userid) gip = gips_initialize (fifo_server_name); gips_open (gip, fifo_client_name); gip_fd = gip_infileno (gip); + open (fifo_server_name, O_WRONLY); while (1) { @@ -513,6 +518,7 @@ void read_kernel_res (void) sizeof(info.hostname)-1); info.port = atoi (gw_res_get (info.kernel_res, "gw.portno", "210")); + strcpy (info.account, gw_res_get (info.kernel_res, "gw.account", "")); } if (info.databases) free (info.databases); diff --git a/kernel/urp.c b/kernel/urp.c index a8956da..a5a5c68 100644 --- a/kernel/urp.c +++ b/kernel/urp.c @@ -2,7 +2,11 @@ * Europagate, 1995 * * $Log: urp.c,v $ - * Revision 1.28 1995/04/19 13:19:09 adam + * Revision 1.29 1995/04/19 16:01:58 adam + * Some hacks to get the FIFO communication work!! Isn't reliable. + * Resource gw.account added - default account info. + * + * Revision 1.28 1995/04/19 13:19:09 adam * New command: account - for authentication. * * Revision 1.27 1995/04/19 10:46:19 adam @@ -126,6 +130,8 @@ int lgets (char *buf, int max, int fd) { if (r == -1) gw_log (GW_LOG_WARN|GW_LOG_ERRNO, KERNEL_LOG, "read fail"); + else + gw_log (GW_LOG_WARN, KERNEL_LOG, "read eof"); buf[no] = '\0'; return 0; } -- 1.7.10.4