Minor hacks really.
[egate.git] / util / gips.c
index b5da5ef..ebc5abb 100644 (file)
@@ -2,7 +2,10 @@
  * Europagate, 1995
  *
  * $Log: gips.c,v $
- * Revision 1.2  1995/04/19 16:02:06  adam
+ * Revision 1.3  1995/04/20 15:12:46  adam
+ * Minor hacks really.
+ *
+ * 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
@@ -46,7 +49,15 @@ int gips_open (GIP gip, const char *client)
 
 int gips_close (GIP gip)
 {
-    close (gip->rfd);
-    close (gip->wfd);
+    if (gip->rfd != -1)
+    {
+        close (gip->rfd);
+       gip->rfd = -1;
+    }
+    if (gip->wfd != -1)
+    {
+        close (gip->wfd);
+       gip->wfd = -1;
+    }
     return 0;
 }