From bcbc621620a06e5cb03db3ab625e15ec5ca7a5ed Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Fri, 21 Apr 1995 16:38:07 +0000 Subject: [PATCH] Added more debugging logs. --- util/gip.c | 8 +++++++- util/gipc.c | 17 +++++++++++++---- util/gips.c | 9 ++++++--- 3 files changed, 26 insertions(+), 8 deletions(-) diff --git a/util/gip.c b/util/gip.c index 488d539..ba09b69 100644 --- a/util/gip.c +++ b/util/gip.c @@ -2,7 +2,10 @@ * Europagate, 1995 * * $Log: gip.c,v $ - * Revision 1.3 1995/04/20 15:12:42 adam + * Revision 1.4 1995/04/21 16:38:07 adam + * Added more debugging logs. + * + * Revision 1.3 1995/04/20 15:12:42 adam * Minor hacks really. * * Revision 1.2 1995/03/27 12:52:18 adam @@ -24,6 +27,8 @@ #include #include +#include + #include GIP gip_initialize (const char *name) @@ -41,6 +46,7 @@ GIP gip_initialize (const char *name) gip->ret = mknod (gip->name, S_IFIFO|0666, 0); gip->errno = errno; gip->rfd = gip->wfd = -1; + gw_log (GW_LOG_DEBUG, "gip", "Creating %s", gip->name); return gip; } diff --git a/util/gipc.c b/util/gipc.c index 1834246..1232341 100644 --- a/util/gipc.c +++ b/util/gipc.c @@ -2,7 +2,10 @@ * Europagate, 1995 * * $Log: gipc.c,v $ - * Revision 1.4 1995/04/20 15:12:45 adam + * Revision 1.5 1995/04/21 16:38:07 adam + * Added more debugging logs. + * + * Revision 1.4 1995/04/20 15:12:45 adam * Minor hacks really. * * Revision 1.3 1995/04/19 16:02:06 adam @@ -41,20 +44,26 @@ 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); + gw_log (GW_LOG_DEBUG, "gipc", "Open readonly of %s", gip->name); + gip->rfd = open (gip->name, O_RDONLY); } else { - gip->wfd = open (server, O_WRONLY|O_NONBLOCK); gip->rfd = open (gip->name, O_RDONLY|O_NONBLOCK); + gip->wfd = open (server, O_WRONLY|O_NONBLOCK); } if (gip->rfd == -1) + { + gw_log (GW_LOG_DEBUG, "gipc", "Cannot open %s", gip->name); return -1; + } if (gip->wfd == -1) + { + gw_log (GW_LOG_DEBUG, "gipc", "Cannot open %s", server); return -2; + } 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 ebc5abb..79eee64 100644 --- a/util/gips.c +++ b/util/gips.c @@ -2,7 +2,10 @@ * Europagate, 1995 * * $Log: gips.c,v $ - * Revision 1.3 1995/04/20 15:12:46 adam + * Revision 1.4 1995/04/21 16:38:08 adam + * Added more debugging logs. + * + * Revision 1.3 1995/04/20 15:12:46 adam * Minor hacks really. * * Revision 1.2 1995/04/19 16:02:06 adam @@ -36,10 +39,10 @@ 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); + gw_log (GW_LOG_DEBUG, "gips", "open writeonly of %s", client); + gip->wfd = open (client, O_WRONLY); if (gip->rfd == -1) return -1; if (gip->wfd == -1) -- 1.7.10.4