From 407dff79ac225f2df0fd2b36d2ce6bbd95941d3a Mon Sep 17 00:00:00 2001 From: Andreas Kool Date: Thu, 1 Jul 1999 20:44:07 +0000 Subject: [PATCH] zone-1.12 --- isdnlog/tools/zone.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/isdnlog/tools/zone.c b/isdnlog/tools/zone.c index c50e9083..b5dd4912 100644 --- a/isdnlog/tools/zone.c +++ b/isdnlog/tools/zone.c @@ -19,6 +19,10 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * $Log$ + * Revision 1.10 1999/06/29 20:11:45 akool + * now compiles with ndbm + * (many thanks to Nima ) + * * Revision 1.9 1999/06/26 12:25:54 akool * isdnlog Version 3.37 * fixed some warnings @@ -109,7 +113,7 @@ struct sth { static struct sth *sthp; static int count; -static char version[] = "1.11"; +static char version[] = "1.12"; static bool area_read = false; #define LINK 127 @@ -406,7 +410,8 @@ static int _initZone(int provider, char *path, char **msg, bool area_only) break; } } /* for */ - free (value.dptr); + if (*dbv == 'G') + free (value.dptr); /* check it */ if (strlen(dversion) == 0 || sthp[ocount].pack_key == '\x0' || @@ -457,7 +462,8 @@ static int _initZone(int provider, char *path, char **msg, bool area_only) sthp[ocount].pack_table == 1 ? (int)(UC)*((UC*)p)++ : sthp[ocount].pack_table == 2 ? (int)(US)*((US*)p)++ : (int)(UL)*((UL*)p)++; - free(value.dptr); + if (*dbv == 'G') + free(value.dptr); if (msg) { snprintf (message, LENGTH, "Zone V%s: Provider %d File '%s' opened fine - " @@ -529,7 +535,8 @@ static int _getZ(struct sth *sthp, char *from, char *sto) { ito = sthp->table[ito]; if (z == LINK) { sprintf(newfrom, "%d", ito); - free(value.dptr); + if (*dbv == 'G') + free(value.dptr); return _getZ(sthp, newfrom, sto); } else { @@ -540,7 +547,8 @@ static int _getZ(struct sth *sthp, char *from, char *sto) { } } } - free(value.dptr); + if (*dbv == 'G') + free(value.dptr); if (found) return z; } /* if dptr */