aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2018-11-08 21:27:11 +0200
committerSergey Poznyakoff <gray@gnu.org>2018-11-08 21:32:17 +0200
commit40f3d1c9374c8f2330655acb856b8ecf9bde0767 (patch)
tree9807cc8d2a3bb516f23edab1594c83d5084d04c1
parentaf64e30e538bd8d227432119ab3f54ac8deb03a2 (diff)
downloadmailfromd-40f3d1c9374c8f2330655acb856b8ecf9bde0767.tar.gz
mailfromd-40f3d1c9374c8f2330655acb856b8ecf9bde0767.tar.bz2
Silently ignore non-existing keys in dbdel
* src/builtin/db.bi (dbdel): Treat MU_ERR_NOENT as success.
-rw-r--r--NEWS3
-rw-r--r--src/builtin/db.bi5
2 files changed, 3 insertions, 5 deletions
diff --git a/NEWS b/NEWS
index 4c82e291..2d853ac5 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,4 @@
-Mailfromd NEWS -- history of user-visible changes. 2018-11-05
+Mailfromd NEWS -- history of user-visible changes. 2018-11-08
See the end of file for copying conditions.
Please send Mailfromd bug reports to <bug-mailfromd@gnu.org.ua>
@@ -10,6 +10,7 @@ Version 8.6.90 (Git)
** Arguments in transaction between mailfromd and calloutd are quoted
** Avoid false failures in testsuite due to libadns warnings
** configure --with-dbm=T accepts any T supported by mailutils
+** The 'dbdel' built-in silently ignores non-existing keys
Version 8.6, 2018-07-24
diff --git a/src/builtin/db.bi b/src/builtin/db.bi
index 8dea160e..4ef11b14 100644
--- a/src/builtin/db.bi
+++ b/src/builtin/db.bi
@@ -404,11 +404,8 @@ MF_DEFUN(dbdel, VOID, STRING dbname, STRING keystr, OPTIONAL, NUMBER null,
if (MF_OPTVAL(null, prop && prop->null))
key.mu_dsize++;
rc = mu_dbm_delete(db, &key);
- if (rc && rc != MU_ERR_FAILURE)
- mu_error(_("error deleting %s from %s: %s"),
- keystr, dbname, mu_dbm_strerror(db));
mu_dbm_destroy(&db);
- MF_ASSERT(rc == 0,
+ MF_ASSERT(rc == 0 || rc == MU_ERR_NOENT,
mfe_dbfailure,
_("failed to delete data `%s' from `%s': %s"),
keystr,

Return to:

Send suggestions and report system problems to the System administrator.