diff -Naur check.c /tmp/src-4.1.4/check.c
--- check.c	Tue Aug 27 09:09:41 2002
+++ /tmp/src-4.1.4/check.c	Thu Aug 29 10:44:07 2002
@@ -15,7 +15,7 @@
 static boolean checkday (long int, long int, int);
 static int checktime (char *);
 static int checkservers (char *);
-static unsigned short int xregstrtol(char *, regmatch_t *, const int);
+static unsigned short int xregstrtol(const char *, regmatch_t *, const int);
 
 /* check range IP addresses */
 void ip_range_control (char *ip)
@@ -36,7 +36,7 @@
 			    {
 				/* init mysql */
 				mysql_init(&mysql);
-				mysql_options(&mysql,MYSQL_READ_DEFAULT_GROUP,"redir");
+//				mysql_options(&mysql,MYSQL_READ_DEFAULT_GROUP,"redir");
 				// connect to mysql
 				if (!(mysql_real_connect(&mysql,sql_opt.host,sql_opt.user,sql_opt.pass,sql_opt.db,0,NULL,0)))
 				    log("%s", mysql_error(&mysql));
@@ -88,7 +88,7 @@
     {
 	/* init mysql */
 	mysql_init(&mysql);
-	mysql_options(&mysql,MYSQL_READ_DEFAULT_GROUP,"redir");
+//	mysql_options(&mysql,MYSQL_READ_DEFAULT_GROUP,"redir");
 	/* connect to mysql */
 	if (!(mysql_real_connect(&mysql,sql_opt.host,sql_opt.user,sql_opt.pass,sql_opt.db,0,NULL,0)))
 	    log("%s", mysql_error(&mysql));
@@ -117,7 +117,7 @@
 			{
 			    /* init mysql */
 			    mysql_init(&mysql);
-			    mysql_options(&mysql,MYSQL_READ_DEFAULT_GROUP,"redir");
+//			    mysql_options(&mysql,MYSQL_READ_DEFAULT_GROUP,"redir");
 			    // connect to mysql
 			    if (!(mysql_real_connect(&mysql,sql_opt.host,sql_opt.user,sql_opt.pass,sql_opt.db,0,NULL,0)))
 				log("%s", mysql_error(&mysql));
@@ -156,7 +156,7 @@
 			FILE *pipein_fp=NULL;
 			/* init mysql */
 			mysql_init(&mysql);
-			mysql_options(&mysql,MYSQL_READ_DEFAULT_GROUP,"redir");
+//			mysql_options(&mysql,MYSQL_READ_DEFAULT_GROUP,"redir");
 			// connect to mysql
 			if (!(mysql_real_connect(&mysql,sql_opt.host,sql_opt.user,sql_opt.pass,sql_opt.db,0,NULL,0)))
 			    log("%s", mysql_error(&mysql));
@@ -219,7 +219,7 @@
 		    {
 			/* init mysql */
 			mysql_init(&mysql);
-			mysql_options(&mysql,MYSQL_READ_DEFAULT_GROUP,"redir");
+//			mysql_options(&mysql,MYSQL_READ_DEFAULT_GROUP,"redir");
 		    	/* connect to mysql */
 
 			if (!(mysql_real_connect(&mysql,sql_opt.host,sql_opt.user,sql_opt.pass,sql_opt.db,0,NULL,0)))
@@ -269,7 +269,7 @@
 return;
 }
 
-static unsigned short int xregstrtol(char *str, regmatch_t *p, const int i)
+static unsigned short int xregstrtol(const char *str, regmatch_t *p, const int i)
 {
 char *buf;
 unsigned short int ret=0;
@@ -288,7 +288,8 @@
 static int
 checktime (char *worktime)
 {
-char *w_time, *wt, *cwt;
+char *wt, *cwt;
+char *w_time;
 unsigned short int start_day, stop_day;
 long int start_time, stop_time;
 int wday, rc=0;
@@ -313,8 +314,8 @@
     {
 	restrcat(&reason,"ACCESS TIME");
         log ("Error in access time format: %s", w_time);
+	free(cwt);
 	regfree(&re);
-        free(cwt);
         return FALSE;
     }
 
@@ -336,7 +337,7 @@
 	if (((start_time <= local_time) && (local_time <= stop_time)) && checkday(start_day, stop_day, wday)) {rc=1; break;}
     }
 }
-if(rc==0) { restrcat(&reason,"ACCESS TIME: "); restrcat(&reason,w_time); }
+if(rc==0) { restrcat(&reason,"ACCESS TIME"); }
 free(cwt);
 regfree(&re);
 return rc;
@@ -365,7 +366,7 @@
     {
 	/* init mysql */
 	mysql_init(&mysql);
-	mysql_options(&mysql,MYSQL_READ_DEFAULT_GROUP,"redir");
+//	mysql_options(&mysql,MYSQL_READ_DEFAULT_GROUP,"redir");
     	/* connect to mysql */
 	if (!(mysql_real_connect(&mysql,sql_opt.host,sql_opt.user,sql_opt.pass,sql_opt.db,0,NULL,0)))
 	    log("%s", mysql_error(&mysql));
diff -Naur main.c /tmp/src-4.1.4/main.c
--- main.c	Tue Aug 27 11:34:27 2002
+++ /tmp/src-4.1.4/main.c	Thu Aug 29 10:45:25 2002
@@ -8,7 +8,7 @@
  *  the Free Software Foundation; either version 2 of the License, or
  *  (at your option) any later version. See COPYING.
  *
- * Sqlredir v 4.1.2 (c) 2002 Tolya Borisenkov <bars@neman.grodno.by>
+ * Sqlredir v 4.1.4 (c) 2002 Tolya Borisenkov <bars@neman.grodno.by>
  * Homepage: http://redir.cu.kiev.ua/ http://redir.neman.grodno.by/
  */
 
diff -Naur readredirconf.c /tmp/src-4.1.4/readredirconf.c
--- readredirconf.c	Tue Aug 27 11:26:08 2002
+++ /tmp/src-4.1.4/readredirconf.c	Thu Aug 29 10:43:35 2002
@@ -22,7 +22,7 @@
 
 /* init mysql */
 mysql_init(&mysql);
-mysql_options(&mysql,MYSQL_READ_DEFAULT_GROUP,"redir");
+//mysql_options(&mysql,MYSQL_READ_DEFAULT_GROUP,"redir");
 /* connect to mysql */
 if (!(mysql_real_connect(&mysql,sql_opt.host,sql_opt.user,sql_opt.pass,sql_opt.db,0,NULL,0)))
     sqlexiterr(mysql);

