From d51076215bd716f784f60cde424b218f321e3852 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Wed, 19 Apr 1995 16:02:06 +0000 Subject: [PATCH] Some hacks to get the FIFO communication work!! Isn't reliable. --- util/gipc.c | 12 +++++++++--- util/gips.c | 8 +++++++- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/util/gipc.c b/util/gipc.c index bd224d0..7066e00 100644 --- a/util/gipc.c +++ b/util/gipc.c @@ -2,7 +2,10 @@ * Europagate, 1995 * * $Log: gipc.c,v $ - * Revision 1.2 1995/03/28 08:03:46 adam + * Revision 1.3 1995/04/19 16:02:06 adam + * Some hacks to get the FIFO communication work!! Isn't reliable. + * + * Revision 1.2 1995/03/28 08:03:46 adam * Non-blocking open used when sync is set. * * Revision 1.1 1995/03/27 08:24:59 adam @@ -18,6 +21,7 @@ #include #include +#include #include GIP gipc_initialize (const char *name) @@ -34,7 +38,9 @@ int gipc_open (GIP gip, const char *server, int sync) { if (sync) { + gw_log (GW_LOG_DEBUG, "gipc", "Open readonly of %s", gip->name); gip->rfd = open (gip->name, O_RDONLY); + gw_log (GW_LOG_DEBUG, "gipc", "Open writeonly of %s", server); gip->wfd = open (server, O_WRONLY); } else @@ -46,8 +52,8 @@ int gipc_open (GIP gip, const char *server, int sync) return -1; if (gip->wfd == -1) return -2; - fcntl (gip->wfd, F_SETFL, ~(O_NONBLOCK|O_APPEND)); - fcntl (gip->rfd, F_SETFL, ~(O_NONBLOCK|O_APPEND)); + fcntl (gip->wfd, F_SETFL, 0); + fcntl (gip->rfd, F_SETFL, 0); return 0; } diff --git a/util/gips.c b/util/gips.c index 8c92960..b5da5ef 100644 --- a/util/gips.c +++ b/util/gips.c @@ -2,7 +2,10 @@ * Europagate, 1995 * * $Log: gips.c,v $ - * Revision 1.1 1995/03/27 08:25:00 adam + * Revision 1.2 1995/04/19 16:02:06 adam + * Some hacks to get the FIFO communication work!! Isn't reliable. + * + * Revision 1.1 1995/03/27 08:25:00 adam * New module gip: Gateway IPc module. * New module gw-db: Gateway hash-db module (user information table). * @@ -15,6 +18,7 @@ #include #include +#include #include GIP gips_initialize (const char *name) @@ -29,7 +33,9 @@ int gips_destroy (GIP gip) int gips_open (GIP gip, const char *client) { + gw_log (GW_LOG_DEBUG, "gips", "open writeonly of %s", client); gip->wfd = open (client, O_WRONLY); + gw_log (GW_LOG_DEBUG, "gips", "open readonly of %s", gip->name); gip->rfd = open (gip->name, O_RDONLY); if (gip->rfd == -1) return -1; -- 1.7.10.4