From: Adam Dickmeiss Date: Wed, 17 May 1995 10:51:43 +0000 (+0000) Subject: Bug fix. X-Git-Url: http://jsfdemo.indexdata.com/?a=commitdiff_plain;h=6d44f69925b304aed150a18a557c8d853aaf8aa2;hp=6cbe4e189c7fd43512081a6766ab0cb0bf1ed551;p=egate.git Bug fix. --- diff --git a/util/gipc.c b/util/gipc.c index 2cd508e..daaa756 100644 --- a/util/gipc.c +++ b/util/gipc.c @@ -45,7 +45,10 @@ * Europagate, 1995 * * $Log: gipc.c,v $ - * Revision 1.7 1995/05/16 09:40:52 adam + * Revision 1.8 1995/05/17 10:51:43 adam + * Bug fix. + * + * Revision 1.7 1995/05/16 09:40:52 adam * LICENSE. * * Revision 1.6 1995/05/01 16:27:29 adam @@ -98,6 +101,12 @@ int gipc_open (GIP gip, const char *server, int sync) gip->wfd = open (server, O_WRONLY); gw_log (GW_LOG_DEBUG, "gipc", "got wfd %d", gip->wfd); + if (gip->wfd == -1) + { + gw_log (GW_LOG_DEBUG|GW_LOG_ERRNO, "gipc", "Cannot open %s", + server); + return -2; + } gw_log (GW_LOG_DEBUG, "gipc", "Open sync readonly of %s", gip->name); gip->rfd = open (gip->name, O_RDONLY); gw_log (GW_LOG_DEBUG, "gipc", "got rfd %d", gip->rfd); @@ -114,7 +123,8 @@ int gipc_open (GIP gip, const char *server, int sync) } if (gip->rfd == -1) { - gw_log (GW_LOG_DEBUG, "gipc", "Cannot open %s", gip->name); + gw_log (GW_LOG_DEBUG|GW_LOG_ERRNO, "gipc", "Cannot open %s", + gip->name); if (gip->wfd != -1) { close (gip->wfd); @@ -124,7 +134,7 @@ int gipc_open (GIP gip, const char *server, int sync) } if (gip->wfd == -1) { - gw_log (GW_LOG_DEBUG, "gipc", "Cannot open %s", server); + gw_log (GW_LOG_DEBUG|GW_LOG_ERRNO, "gipc", "Cannot open %s", server); close (gip->rfd); gip->rfd = -1; return -2;