X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=util%2Fgip.c;h=b1a5195383b4e57922beee50aa532c214cc53b13;hb=930f1b9b6effd9f1944a74487e835c721550be2f;hp=0bf516dddbd044f64821fe55cb3bcfc495e33c2b;hpb=e1ec9d39463f431383547891f38e30f2ff17842c;p=egate.git diff --git a/util/gip.c b/util/gip.c index 0bf516d..b1a5195 100644 --- a/util/gip.c +++ b/util/gip.c @@ -45,7 +45,14 @@ * Europagate, 1995 * * $Log: gip.c,v $ - * Revision 1.7 1995/05/16 09:40:52 adam + * Revision 1.9 1997/12/15 15:04:18 adam + * Changed name of member errno to errorno since some systems + * defines error as a preprocessor variable. + * + * Revision 1.8 1995/05/22 09:03:41 adam + * New argument, block, to cs_open. + * + * Revision 1.7 1995/05/16 09:40:52 adam * LICENSE. * * Revision 1.6 1995/05/02 15:26:52 adam @@ -97,7 +104,7 @@ GIP gip_initialize (const char *name) } strcpy (gip->name, name); gip->ret = mknod (gip->name, S_IFIFO|0666, 0); - gip->errno = errno; + gip->errorno = errno; gip->rfd = gip->wfd = -1; gw_log (GW_LOG_DEBUG, "gip", "Creating %s", gip->name); return gip; @@ -107,6 +114,7 @@ int gip_destroy (GIP gip) { assert (gip); + unlink (gip->name); free (gip->name); free (gip); return 0; @@ -124,7 +132,7 @@ int gip_outfileno (GIP gip) int gip_errno (GIP gip) { - return gip->errno; + return gip->errorno; } int gip_read (GIP gip, char *buf, size_t count) @@ -139,7 +147,7 @@ int gip_read (GIP gip, char *buf, size_t count) break; if (errno != EINTR) { - gip->errno = errno; + gip->errorno = errno; return -1; } } @@ -160,7 +168,7 @@ int gip_write (GIP gip, const char *buf, size_t count) break; if (errno != EINTR) { - gip->errno = errno; + gip->errorno = errno; return -1; } }