diff options
-rw-r--r-- | Changes | 1 | ||||
-rw-r--r-- | src/init.c | 5 | ||||
-rw-r--r-- | src/mysql.c | 16 | ||||
-rw-r--r-- | version.log | 6 |
4 files changed, 20 insertions, 8 deletions
@@ -7,6 +7,7 @@ Provided by Anope Dev. <dev@anope.org> - 2004 Provided by Trystan <trystan@nomadirc.net> - 2004 11/19 A Added anope_cmd_ctcp() to code API, for sending CTCP messages. [ #00] +11/20 F Disables UseRDB if there is an error duing SQL init [ #00] 11/20 F MS CHECK now checks if the nick is forbidden. [#225] 11/20 F Removing Sqline on bot nicks change if the nick was registered. [#224] 11/19 F normalizeBuffer() now strips control character 1. [ #00] diff --git a/src/init.c b/src/init.c index 899b79ee3..7a7113591 100644 --- a/src/init.c +++ b/src/init.c @@ -553,7 +553,10 @@ int init(int ac, char **av) helpserv_init(); #ifdef USE_RDB - rdb_init(); + if (!rdb_init()) { + UseRDB = 0; + alog("Error: Disabling UseRDB due to errors with SQL"); + } #endif /* Initialize proxy detection */ diff --git a/src/mysql.c b/src/mysql.c index e9827e7fb..707515113 100644 --- a/src/mysql.c +++ b/src/mysql.c @@ -54,11 +54,12 @@ int db_mysql_init() /* If the host is not defined, assume we don't want MySQL */ if (!MysqlHost) { do_mysql = 0; - alog("MySQL has been disabled."); + alog("MySQL: has been disabled."); + return 0; } else { do_mysql = 1; - alog("MySQL has been enabled."); - alog("MySQL client version %s.",mysql_get_client_info()); + alog("MySQL: has been enabled."); + alog("MySQL: client version %s.",mysql_get_client_info()); } /* The following configuration options are required. @@ -68,10 +69,13 @@ int db_mysql_init() if ((do_mysql) && (!MysqlName || !MysqlUser)) { do_mysql = 0; alog("MySQL Error: Set all required configuration options."); + return 0; } - if (!db_mysql_open()) + if (!db_mysql_open()) { do_mysql = 0; + return 0; + } return 1; } @@ -95,14 +99,14 @@ int db_mysql_open() if ((!mysql_real_connect (mysql, MysqlHost, MysqlUser, MysqlPass, MysqlName, MysqlPort, MysqlSock, 0))) { - log_perror("Cant connect to MySQL: %s\n", mysql_error(mysql)); + log_perror("MySQL Error: Cant connect to MySQL: %s\n", mysql_error(mysql)); return 0; } } else { if ((!mysql_real_connect (mysql, MysqlHost, MysqlUser, MysqlPass, MysqlName, MysqlPort, NULL, 0))) { - log_perror("Cant connect to MySQL: %s\n", mysql_error(mysql)); + log_perror("MySQL Error: Cant connect to MySQL: %s\n", mysql_error(mysql)); return 0; } } diff --git a/version.log b/version.log index cbdfbbe60..66fbb0e02 100644 --- a/version.log +++ b/version.log @@ -8,10 +8,14 @@ VERSION_MAJOR="1" VERSION_MINOR="7" VERSION_PATCH="6" -VERSION_BUILD="455" +VERSION_BUILD="456" # $Log$ # +# BUILD : 1.7.6 (456) +# BUGS : N/A +# NOTES : Disables UseRDB if SQL fails to init +# # BUILD : 1.7.6 (455) # BUGS : N/A # NOTES : Clean up changelog |