lgets function moved from kernel to util.
[egate.git] / util / gipc.c
index 1834246..1232341 100644 (file)
@@ -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;