Index: /branches/rel_avx_2_7_5/src/backend/sys_cmd.c
===================================================================
--- /branches/rel_avx_2_7_5/src/backend/sys_cmd.c	(revision 9208)
+++ /branches/rel_avx_2_7_5/src/backend/sys_cmd.c	(working copy)
@@ -7694,12 +7694,37 @@
 
 int set_system_from_mail(char *mail) {
     int ret1 = ha_set_from_mail(mail);
+    if (ret1 == -1) {
+        return -1;
+    }
     int ret2 = system_mail_from(mail);
     return (ret1 && ret2);
 }
 
-int del_system_from_mail(char *mail) {
-    int ret1 = ha_del_from_mail(mail);
-    int ret2 = no_system_mail_from(mail);
+int del_system_from_mail() {
+    int ret1 = ha_del_from_mail();
+    if (ret1 == -1) {
+        return -1;
+    }
+
+    int ret2 = no_system_mail_from();
+    return (ret1 && ret2);
+}
+
+int clear_system_mail(){
+    int ret1 = ha_del_from_mail();
+    if (ret1 == -1) {
+        return -1;
+    }
+    int ret2 = clear_system_mail_conf();
+    return (ret1 && ret2); 
+}
+
+int clear_ha_conf() {
+    int ret1 = ha_clear_config();
+    if(ret1 == -1) {
+        return -1;
+    }
+    int ret2 = no_system_mail_from();
     return (ret1 && ret2);
 }
Index: /branches/rel_avx_2_7_5/src/generator/commands.pm
===================================================================
--- /branches/rel_avx_2_7_5/src/generator/commands.pm	(revision 9208)
+++ /branches/rel_avx_2_7_5/src/generator/commands.pm	(working copy)
@@ -294,7 +294,7 @@
         cmd_attribute => "CMD_ARRAYOS|CMD_NORMAL",
         user_level => "CLI_LEVEL_CONFIG",
         help_string => "Reset system mail configuration",
-        function_name => "clear_system_mail_conf",
+        function_name => "clear_system_mail",
         function_args => [],
     },
     {
@@ -2295,7 +2295,7 @@
                 user_level => "CLI_LEVEL_CONFIG",
                 menu => "root_clear_ha",
                 help_string => "Clear all the HA configurations",
-                function_name => "ha_clear_config",
+                function_name => "clear_ha_conf",
         },
 	{
 		obj_type => "MENU",
Index: /branches/rel_avx_2_7_5/src/library/avxha/avx_ha.c
===================================================================
--- /branches/rel_avx_2_7_5/src/library/avxha/avx_ha.c	(revision 9208)
+++ /branches/rel_avx_2_7_5/src/library/avxha/avx_ha.c	(working copy)
@@ -648,7 +648,7 @@
     strcpy(sinfo->from_mail, mail);
 
     update_ha_info(sinfo);
-    ret = -1;
+    ret = 0;
 
 cleanup:
     if(sinfo) {
@@ -1107,7 +1107,7 @@
 
     strcpy(sinfo->vip, AVX_HA_DEFAULT_IP);
     strcpy(sinfo->sync_time, "NO");
-    strcpy(sinfo->from_mail, HA_STRING_NONE);
+    strcpy(sinfo->from_mail, DEF_MAIL_FROM);
 
     for(i = 0; i < sinfo->to_mail_total; i++) {
         strcpy(*(sinfo->to_mail + i), HA_STRING_NONE);
Index: /branches/rel_avx_2_7_5/src/library/ca_regex/avx_regex.c
===================================================================
--- /branches/rel_avx_2_7_5/src/library/ca_regex/avx_regex.c	(revision 9208)
+++ /branches/rel_avx_2_7_5/src/library/ca_regex/avx_regex.c	(working copy)
@@ -45,7 +45,7 @@
 #include "avx_regex.h"
 #include "patricia.h"
 
-extern regexp *regcomp(char *exp);
+extern regexp *ca_regcomp(char *exp);
 
 #ifdef MALLOC_DEFINE
 MALLOC_DEFINE(M_REGEX_NODE, "regex_node_t",	"regex tree node");
@@ -908,7 +908,7 @@
 	new_regex_node->data = NULL;
 	new_regex_node->perl_regex = 1;
 	
-	new_regex_node->compiledReg = regcomp(pattern);
+	new_regex_node->compiledReg = ca_regcomp(pattern);
 	if(new_regex_node->compiledReg == NULL) {
 		REGEX_FREE(new_regex_node, M_REGEX_NODE);
 		return NULL;
@@ -933,7 +933,7 @@
 		{
 			/* Send back this one, since it is a duplicate */
 			REGEX_FREE(new_regex_node->regular_expression, M_TEMP);
-			regfree(new_regex_node->compiledReg);
+			ca_regfree(new_regex_node->compiledReg);
 			REGEX_FREE(new_regex_node, M_REGEX_NODE);
 			return curr;
 		}
@@ -956,7 +956,7 @@
 			REGEX_FREE(regex_node->regular_expression, M_TEMP);
 		}
 		if(regex_node->compiledReg) {
-			regfree(regex_node->compiledReg);
+			ca_regfree(regex_node->compiledReg);
 		}
 		REGEX_FREE(regex_node, M_REGEX_NODE);
 	}
Index: /branches/rel_avx_2_7_5/src/library/ca_regex/regexp_match.h
===================================================================
--- /branches/rel_avx_2_7_5/src/library/ca_regex/regexp_match.h	(revision 9208)
+++ /branches/rel_avx_2_7_5/src/library/ca_regex/regexp_match.h	(working copy)
@@ -23,9 +23,9 @@
 } regexp;
 
 #ifdef _KERNEL
-regexp *regcomp(char *exp);
-void regfree(regexp *r);
-void regerror(const char* s);
+regexp *ca_regcomp(char *exp);
+void ca_regfree(regexp *r);
+void ca_regerror(const char* s);
 /*extern void regsub();*/
 #endif
 
Index: /branches/rel_avx_2_7_5/src/library/ca_regex/regexp_match.c
===================================================================
--- /branches/rel_avx_2_7_5/src/library/ca_regex/regexp_match.c	(revision 9208)
+++ /branches/rel_avx_2_7_5/src/library/ca_regex/regexp_match.c	(working copy)
@@ -148,7 +148,7 @@
 STATIC char *regnext(register char *p);
 
 
-#define	REGEXP_FAIL(m)	{ regerror(m); return(NULL); }
+#define	REGEXP_FAIL(m)	{ ca_regerror(m); return(NULL); }
 #define	ISMULT(c)	((c) == '*' || (c) == '+' || (c) == '?')
 
 /*
@@ -198,7 +198,7 @@
 //#define isalnum(var) (isalpha(var)||isdigit(var))
 
 void
-regerror(const char* s)
+ca_regerror(const char* s)
 {
 #ifdef ERRAVAIL
 	error("regexp: %s", s);
@@ -229,7 +229,7 @@
  * of the structure of the compiled regexp.
  */
 regexp *
-regcomp(char *exp)
+ca_regcomp(char *exp)
 {
 	register regexp *r;
 	register char *scan;
@@ -313,7 +313,7 @@
 
 
 void 
-regfree(regexp * r)
+ca_regfree(regexp * r)
 {
 	REGEX_FREE(r, M_PROXYTEMP);
 }
@@ -1002,7 +1002,7 @@
 			return(1);	/* Success! */
 			break;
 		default:
-			regerror("memory corruption");
+			ca_regerror("memory corruption");
 			return(0);
 			break;
 		}
@@ -1014,7 +1014,7 @@
 	 * We get here only if there's trouble -- normally "case END" is
 	 * the terminating point.
 	 */
-	regerror("corrupted pointers");
+	ca_regerror("corrupted pointers");
 	return(0);
 }
 
@@ -1054,7 +1054,7 @@
 		}
 		break;
 	default:		/* Oh dear.  Called inappropriately. */
-		regerror("internal foulup");
+		ca_regerror("internal foulup");
 		count = 0;	/* Best compromise. */
 		break;
 	}
@@ -1209,7 +1209,7 @@
 		p = "WORDZ";
 		break;
 	default:
-		regerror("corrupted opcode");
+		ca_regerror("corrupted opcode");
 		break;
 	}
 	if (p != NULL)
@@ -1259,13 +1259,13 @@
 
 	/* Be paranoid... */
 	if (prog == NULL || string == NULL) {
-		regerror("NULL parameter");
+		ca_regerror("NULL parameter");
 		return(0);
 	}
 
 	/* Check validity of program. */
 	if (UCHARAT(prog->program) != MAGIC) {
-		regerror("corrupted program");
+		ca_regerror("corrupted program");
 		return(0);
 	}
 
