From 8954f31c7c33351deff85e0f419bb6abb2c4ca54 Mon Sep 17 00:00:00 2001 From: Clint Adams Date: Mon, 21 Jul 2008 02:24:03 +0000 Subject: 25321: delete gdbm node when corresponding hash entry is unset. --- Src/Modules/db_gdbm.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Src/Modules/db_gdbm.c') diff --git a/Src/Modules/db_gdbm.c b/Src/Modules/db_gdbm.c index d8f6724ea..ce7a6f57e 100644 --- a/Src/Modules/db_gdbm.c +++ b/Src/Modules/db_gdbm.c @@ -132,7 +132,6 @@ gdbmsetfn(Param pm, char **val) datum key, content; int ret; - key.dptr = pm->node.nam; key.dsize = strlen(key.dptr) + 1; content.dptr = val; @@ -145,7 +144,13 @@ gdbmsetfn(Param pm, char **val) static void gdbmunsetfn(Param pm, int um) { + datum key; + int ret; + + key.dptr = pm->node.nam; + key.dsize = strlen(key.dptr) + 1; + ret = gdbm_delete(dbf, key); } /**/ -- cgit v1.2.3