This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GNU Mailutils".
http://git.savannah.gnu.org/cgit/mailutils.git/commit/?id=47c18140b870504d9ce4d4c386530c1a73dccfe2 The branch, master has been updated via 47c18140b870504d9ce4d4c386530c1a73dccfe2 (commit) from df905e61a7c77f02203c3445757a6f59a02a85b0 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 47c18140b870504d9ce4d4c386530c1a73dccfe2 Author: Sergey Poznyakoff <g...@gnu.org.ua> Date: Wed Nov 9 23:38:52 2011 +0200 Implement _dbm_get_fd in Kyoto cabinet. * libmu_dbm/kyoto.c: Implement _dbm_get_fd. ----------------------------------------------------------------------- Summary of changes: libmu_dbm/kyoto.c | 17 ++++++++++++++++- 1 files changed, 16 insertions(+), 1 deletions(-) diff --git a/libmu_dbm/kyoto.c b/libmu_dbm/kyoto.c index 1830b2f..52563d7 100644 --- a/libmu_dbm/kyoto.c +++ b/libmu_dbm/kyoto.c @@ -19,6 +19,7 @@ # include <config.h> #endif #include <fcntl.h> +#include <unistd.h> #include <stdlib.h> #include <string.h> #include <sys/stat.h> @@ -38,6 +39,7 @@ struct kc_descr { KCDB *db; /* db */ KCCUR *cur; /* cursor */ + int fd; }; static int @@ -49,7 +51,17 @@ _kc_file_safety (mu_dbm_file_t db, int mode, uid_t owner) int _kc_get_fd (mu_dbm_file_t db, int *pag, int *dir) { - return ENOSYS; + struct kc_descr *kcd = db->db_descr; + if (kcd->fd == -1) + { + kcd->fd = open (db->db_name, O_RDONLY); + if (kcd->fd == -1) + return errno; + } + *pag = kcd->fd; + if (dir) + *dir = kcd->fd; + return 0; } static int @@ -93,6 +105,7 @@ _kc_open (mu_dbm_file_t db, int flags, int mode) kcd->db = kdb; kcd->cur = NULL; db->db_descr = kcd; + kcd->fd = -1; return 0; } @@ -102,6 +115,8 @@ _kc_close (mu_dbm_file_t db) if (db->db_descr) { struct kc_descr *kcd = db->db_descr; + if (kcd->fd != -1) + close (kcd->fd); kcdbclose (kcd->db); kcdbdel (kcd->db); free (kcd); hooks/post-receive -- GNU Mailutils _______________________________________________ Commit-mailutils mailing list Commit-mailutils@gnu.org https://lists.gnu.org/mailman/listinfo/commit-mailutils