changeset 244:7082044c05c6

renamed `alias_local_cmp' to `localpartcmp' this is more accurate
author markus schnalke <meillo@marmaro.de>
date Mon, 25 Oct 2010 17:48:08 -0300
parents e758296de02d
children 2f5e2b6a3a39
files src/alias.c src/conf.c src/masqmail.h
diffstat 3 files changed, 8 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/alias.c	Mon Oct 25 17:46:13 2010 -0300
+++ b/src/alias.c	Mon Oct 25 17:48:08 2010 -0300
@@ -40,7 +40,7 @@
 			a = create_address_qualified(addr_node->data, TRUE, conf.host_name);
 			DEBUG(6) debugf("not_local_addresses: addr_node->data=%s a->address=%s\n",
 			                addr_node->data, a->address);
-			if (addr_isequal(a, addr, conf.alias_local_cmp)) {
+			if (addr_isequal(a, addr, conf.localpartcmp)) {
 				destroy_address(a);
 				/* in local_hosts but also in not_local_addresses */
 				return FALSE;
@@ -54,7 +54,7 @@
 		a = create_address_qualified(addr_node->data, TRUE, conf.host_name);
 		DEBUG(6) debugf("local_addresses: addr_node->data=%s a->address=%s\n",
 		                addr_node->data, a->address);
-		if (addr_isequal(a, addr, conf.alias_local_cmp)) {
+		if (addr_isequal(a, addr, conf.localpartcmp)) {
 			destroy_address(a);
 			/* in local_addresses */
 			return TRUE;
@@ -124,7 +124,7 @@
 		   see RFC 822 and RFC 5321 */
 		val = (gchar *) table_find_func(alias_table, addr->local_part, strcasecmp);
 	} else {
-		val = (gchar *) table_find_func(alias_table, addr->local_part, conf.alias_local_cmp);
+		val = (gchar *) table_find_func(alias_table, addr->local_part, conf.localpartcmp);
 	}
 	if (!val) {
 		DEBUG(5) debugf("alias: '%s' is fully expanded, hence completed\n",
@@ -175,7 +175,7 @@
 
 		/* addr is local and to expand at this point */
 		/* but first ... search in parents for loops: */
-		if (addr_isequal_parent(addr, alias_addr, conf.alias_local_cmp)) {
+		if (addr_isequal_parent(addr, alias_addr, conf.localpartcmp)) {
 			/* loop detected, ignore this path */
 			logwrite(LOG_ALERT, "alias: detected loop, hence ignoring '%s'\n",
 			         alias_addr->local_part);
@@ -238,7 +238,7 @@
 		rcpt_node_next = g_list_next(rcpt_node);
 		foreach(non_rcpt_list, non_node) {
 			address *non_addr = (address *) (non_node->data);
-			if (addr_isequal(addr, non_addr, conf.alias_local_cmp)) {
+			if (addr_isequal(addr, non_addr, conf.localpartcmp)) {
 				done_list = g_list_remove_link(done_list, rcpt_node);
 				g_list_free_1(rcpt_node);
 				/* this address is still in the children lists
--- a/src/conf.c	Mon Oct 25 17:46:13 2010 -0300
+++ b/src/conf.c	Mon Oct 25 17:48:08 2010 -0300
@@ -429,7 +429,7 @@
 
 	conf.log_max_pri = 7;
 	conf.do_relay = TRUE;
-	conf.alias_local_cmp = strcmp;
+	conf.localpartcmp = strcmp;
 	conf.max_defer_time = 86400 * 4;  /* 4 days */
 	conf.max_msg_size = 0; /* no limit on msg size */
 	conf.spool_dir = SPOOL_DIR;
@@ -494,7 +494,7 @@
 		else if (strcmp(lval, "alias_file") == 0) {
 			conf.alias_file = g_strdup(rval);
 		} else if (strcmp(lval, "caseless_matching") == 0) {
-			conf.alias_local_cmp = parse_boolean(rval) ? strcasecmp : strcmp;
+			conf.localpartcmp = parse_boolean(rval) ? strcasecmp : strcmp;
 		} else if (strcmp(lval, "mbox_default") == 0) {
 			conf.mbox_default = g_strdup(rval);
 		} else if (strcmp(lval, "mbox_users") == 0) {
--- a/src/masqmail.h	Mon Oct 25 17:46:13 2010 -0300
+++ b/src/masqmail.h	Mon Oct 25 17:48:08 2010 -0300
@@ -179,7 +179,7 @@
 	gboolean pipe_fromhack;
 
 	gchar *alias_file;
-	int (*alias_local_cmp) (const char *, const char *);
+	int (*localpartcmp) (const char *, const char *);
 
 	GList *local_net_routes;
 	GList *connect_routes;  /* list of pairs which point to lists */