dovecot-2.2: acl: Minor macro naming cleanup

dovecot at dovecot.org dovecot at dovecot.org
Sat Jan 18 00:36:43 EET 2014


details:   http://hg.dovecot.org/dovecot-2.2/rev/6018854c8c91
changeset: 17116:6018854c8c91
user:      Timo Sirainen <tss at iki.fi>
date:      Fri Jan 17 17:36:29 2014 -0500
description:
acl: Minor macro naming cleanup

diffstat:

 src/plugins/acl/acl-backend-vfile.c |  14 +++++++-------
 src/plugins/acl/acl-backend-vfile.h |   4 ++--
 2 files changed, 9 insertions(+), 9 deletions(-)

diffs (68 lines):

diff -r 018c66251db6 -r 6018854c8c91 src/plugins/acl/acl-backend-vfile.c
--- a/src/plugins/acl/acl-backend-vfile.c	Fri Jan 17 17:33:47 2014 -0500
+++ b/src/plugins/acl/acl-backend-vfile.c	Fri Jan 17 17:36:29 2014 -0500
@@ -166,17 +166,17 @@
 
 	if (validity->last_check + (time_t)backend->cache_secs > ioloop_time) {
 		/* use the cached value */
-		return validity->last_mtime != VALIDITY_MTIME_NOTFOUND;
+		return validity->last_mtime != ACL_VFILE_VALIDITY_MTIME_NOTFOUND;
 	}
 
 	validity->last_check = ioloop_time;
 	if (stat(path, &st) < 0) {
 		if (errno == ENOENT || errno == ENOTDIR) {
-			validity->last_mtime = VALIDITY_MTIME_NOTFOUND;
+			validity->last_mtime = ACL_VFILE_VALIDITY_MTIME_NOTFOUND;
 			return 0;
 		}
 		if (errno == EACCES) {
-			validity->last_mtime = VALIDITY_MTIME_NOACCESS;
+			validity->last_mtime = ACL_VFILE_VALIDITY_MTIME_NOACCESS;
 			return 1;
 		}
 		i_error("stat(%s) failed: %m", path);
@@ -283,14 +283,14 @@
 		if (errno == ENOENT || errno == ENOTDIR) {
 			if (aclobj->backend->debug)
 				i_debug("acl vfile: file %s not found", path);
-			validity->last_mtime = VALIDITY_MTIME_NOTFOUND;
+			validity->last_mtime = ACL_VFILE_VALIDITY_MTIME_NOTFOUND;
 		} else if (errno == EACCES) {
 			if (aclobj->backend->debug)
 				i_debug("acl vfile: no access to file %s",
 					path);
 
 			acl_object_remove_all_access(aclobj);
-			validity->last_mtime = VALIDITY_MTIME_NOACCESS;
+			validity->last_mtime = ACL_VFILE_VALIDITY_MTIME_NOACCESS;
 		} else {
 			i_error("open(%s) failed: %m", path);
 			return -1;
@@ -433,10 +433,10 @@
 	if (ret < 0) {
 		if (errno == ENOENT || errno == ENOTDIR) {
 			/* if the file used to exist, we have to re-read it */
-			return validity->last_mtime != VALIDITY_MTIME_NOTFOUND;
+			return validity->last_mtime != ACL_VFILE_VALIDITY_MTIME_NOTFOUND;
 		} 
 		if (errno == EACCES)
-			return validity->last_mtime != VALIDITY_MTIME_NOACCESS;
+			return validity->last_mtime != ACL_VFILE_VALIDITY_MTIME_NOACCESS;
 		i_error("stat(%s) failed: %m", path);
 		return -1;
 	}
diff -r 018c66251db6 -r 6018854c8c91 src/plugins/acl/acl-backend-vfile.h
--- a/src/plugins/acl/acl-backend-vfile.h	Fri Jan 17 17:33:47 2014 -0500
+++ b/src/plugins/acl/acl-backend-vfile.h	Fri Jan 17 17:36:29 2014 -0500
@@ -6,8 +6,8 @@
 #define ACL_FILENAME "dovecot-acl"
 #define ACLLIST_FILENAME "dovecot-acl-list"
 
-#define VALIDITY_MTIME_NOTFOUND 0
-#define VALIDITY_MTIME_NOACCESS -1
+#define ACL_VFILE_VALIDITY_MTIME_NOTFOUND 0
+#define ACL_VFILE_VALIDITY_MTIME_NOACCESS -1
 
 struct acl_vfile_validity {
 	time_t last_check;


More information about the dovecot-cvs mailing list