X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=libatalk%2Fcnid%2Fdbd%2Fcnid_dbd.c;h=2f12b2f0d695235c95466b90dd2e0ef53ca1f418;hb=7b12c56c26d0ce7ef5834c71d3c8bcc90fef2532;hp=281f34e44380dbcd674a9cbbc5fa430294ec40f1;hpb=1621d0d3028021877ca849af44a1f8f7ab81faf0;p=netatalk.git diff --git a/libatalk/cnid/dbd/cnid_dbd.c b/libatalk/cnid/dbd/cnid_dbd.c index 281f34e4..2f12b2f0 100644 --- a/libatalk/cnid/dbd/cnid_dbd.c +++ b/libatalk/cnid/dbd/cnid_dbd.c @@ -1,5 +1,5 @@ /* - * $Id: cnid_dbd.c,v 1.12 2009-11-12 10:08:22 didg Exp $ + * $Id: cnid_dbd.c,v 1.16 2010-01-21 14:14:49 didg Exp $ * * Copyright (C) Joerg Lenneis 2003 * All Rights Reserved. See COPYING. @@ -130,7 +130,6 @@ static int tsock_getfd(const char *host, const char *port) break; } -exit: freeaddrinfo(servinfo); if (p == NULL) { @@ -443,7 +442,7 @@ static struct _cnid_db *cnid_dbd_new(const char *volpath) } /* ---------------------- */ -struct _cnid_db *cnid_dbd_open(const char *dir, mode_t mask _U_) +struct _cnid_db *cnid_dbd_open(const char *dir, mode_t mask _U_, u_int32_t flags _U_) { CNID_private *db = NULL; struct _cnid_db *cdb = NULL; @@ -498,7 +497,7 @@ void cnid_dbd_close(struct _cnid_db *cdb) } if ((db = cdb->_private) != NULL) { - LOG(log_info, logtype_cnid, "closing database connection for volume '%s'", db->db_dir); + LOG(log_debug, logtype_cnid, "closing database connection for volume '%s'", db->db_dir); if (db->fd >= 0) close(db->fd); @@ -514,7 +513,7 @@ void cnid_dbd_close(struct _cnid_db *cdb) /* ---------------------- */ cnid_t cnid_dbd_add(struct _cnid_db *cdb, const struct stat *st, const cnid_t did, char *name, const size_t len, - cnid_t hint _U_) + cnid_t hint) { CNID_private *db; struct cnid_dbd_rqst rqst; @@ -542,6 +541,7 @@ cnid_t cnid_dbd_add(struct _cnid_db *cdb, const struct stat *st, rqst.ino = st->st_ino; rqst.type = S_ISDIR(st->st_mode)?1:0; + rqst.cnid = hint; rqst.did = did; rqst.name = name; rqst.namelen = len;