]> arthur.barton.de Git - netatalk.git/commitdiff
Some fixes to logging statements
authorfranklahm <franklahm>
Thu, 28 May 2009 10:22:07 +0000 (10:22 +0000)
committerfranklahm <franklahm>
Thu, 28 May 2009 10:22:07 +0000 (10:22 +0000)
etc/cnid_dbd/dbd_lookup.c
etc/cnid_dbd/dbd_update.c
libatalk/cnid/dbd/cnid_dbd.c

index 7c8dfb5401b55b617f9664b00bbe5cba3f25a8fe..d3796d990ceb527cb96547ca93dcc21bbcb1965a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: dbd_lookup.c,v 1.7 2009-05-14 13:46:08 franklahm Exp $
+ * $Id: dbd_lookup.c,v 1.8 2009-05-28 10:22:07 franklahm Exp $
  *
  * Copyright (C) Joerg Lenneis 2003
  * All Rights Reserved.  See COPYING.
@@ -110,6 +110,7 @@ int dbd_lookup(DBD *dbd, struct cnid_dbd_rqst *rqst, struct cnid_dbd_rply *rply)
     }
     
     if (didname) {
+        LOG(log_maxdebug, logtype_cnid, "CNID resolve problem: changed dev/ino for '%s'", rqst->name);
         rqst->cnid = id_didname;
         /* we have a did:name 
          * if it's the same dev or not the same type
@@ -127,6 +128,7 @@ int dbd_lookup(DBD *dbd, struct cnid_dbd_rqst *rqst, struct cnid_dbd_rply *rply)
     }
 
     if (devino) {
+        LOG(log_maxdebug, logtype_cnid, "CNID resolve problem: server side rename oder reused inode for '%s'", rqst->name);
         rqst->cnid = id_devino;
         if (type_devino != rqst->type) {
             /* same dev:inode but not same type one is a folder the other 
index 2ac5be107d5f242fd93d044c30510edcf1db553d..491a04d9ac640bc29534c4137b8707bfe3af01db 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: dbd_update.c,v 1.5 2009-05-06 11:54:24 franklahm Exp $
+ * $Id: dbd_update.c,v 1.6 2009-05-28 10:22:07 franklahm Exp $
  *
  * Copyright (C) Joerg Lenneis 2003
  * All Rights Reserved.  See COPYING.
@@ -59,7 +59,7 @@ int dbd_update(DBD *dbd, struct cnid_dbd_rqst *rqst, struct cnid_dbd_rply *rply)
     else if  (rc > 0) {
         memcpy(&tmpcnid, pkey.data, sizeof(cnid_t));
         LOG(log_debug, logtype_cnid, "dbd_update: Deleting %u corresponding to dev/ino 0x%llx/0x%llx from cnid2.db",
-            ntohl(tmpcnid), ntoh64((unsigned long long int)rqst->dev), ntoh64((unsigned long long int)rqst->ino));
+            ntohl(tmpcnid), (unsigned long long)rqst->dev, (unsigned long long)rqst->ino);
 
         if ((rc = dbif_del(dbd, DBIF_CNID, &pkey, 0)) < 0 ) {
             goto err_db;
@@ -112,17 +112,14 @@ int dbd_update(DBD *dbd, struct cnid_dbd_rqst *rqst, struct cnid_dbd_rply *rply)
         goto err_db;
 
     LOG(log_info, logtype_cnid, "dbd_update: Updated cnid2.db with dev/ino 0x%llx/0x%llx did %u name %s cnid %u",
-        ntoh64((unsigned long long int)rqst->dev), ntoh64((unsigned long long int)rqst->ino),
-        ntohl(rqst->did), rqst->name, ntohl(rqst->cnid));
+        (unsigned long long)rqst->dev, (unsigned long long)rqst->ino, ntohl(rqst->did), rqst->name, ntohl(rqst->cnid));
 
     rply->result = CNID_DBD_RES_OK;
     return 1;
 
 err_db:
     LOG(log_error, logtype_cnid, "dbd_update: Unable to update CNID %u dev/ino 0x%llx/0x%llx, DID %ul: %s",
-        ntohl(rqst->cnid),
-        ntoh64((unsigned long long int)rqst->dev), ntoh64((unsigned long long int)rqst->ino),
-        rqst->did, rqst->name);
+        ntohl(rqst->cnid), (unsigned long long)rqst->dev, (unsigned long long)rqst->ino, rqst->did, rqst->name);
 
     rply->result = CNID_DBD_RES_ERR_DB;
     return -1;
index 9ed3613bc9292b9acea146c532138bd76c75c5f4..b7c47e7954888172653c76a7a9b81fdee90b42d5 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: cnid_dbd.c,v 1.7 2009-04-21 08:55:44 franklahm Exp $
+ * $Id: cnid_dbd.c,v 1.8 2009-05-28 10:22:07 franklahm Exp $
  *
  * Copyright (C) Joerg Lenneis 2003
  * All Rights Reserved.  See COPYING.
@@ -652,7 +652,7 @@ char *cnid_dbd_resolve(struct _cnid_db *cdb, cnid_t *id, void *buffer, size_t le
     case CNID_DBD_RES_OK:
         *id = rply.did;
         name = rply.name;
-        LOG(log_debug, logtype_cnid, "cnid_dbd_resolve: resolved CNID: %u to '%s'", ntohl(*id), name);
+        LOG(log_debug, logtype_cnid, "cnid_dbd_resolve: resolved did: %u, name: '%s'", ntohl(*id), name);
         break;
     case CNID_DBD_RES_NOTFOUND:
         *id = CNID_INVALID;