summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorgeniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2007-01-22 17:20:14 +0000
committergeniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2007-01-22 17:20:14 +0000
commit976c246b69722f36a1a91f44c1283c5424b98cd6 (patch)
treeff9afc8600dfdc4deb217ee7cbbed6089eb25525 /src/main.c
parentbf19cf3784e5dc75a0b5564cb3a0649b11a89d26 (diff)
BUILD : 1.7.18 (1228) BUGS : 672 NOTES : Fixed a crash when MySQL was enabled; it checked the (unset) uplink server flags resulting in a segfault
git-svn-id: svn://svn.anope.org/anope/trunk@1228 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@947 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/main.c b/src/main.c
index 2ebcc48f2..6a9520d90 100644
--- a/src/main.c
+++ b/src/main.c
@@ -183,42 +183,46 @@ void save_databases(void)
* If we send them during the sync, we fuck something up there and
* break the syncing process, resulting in lost (literally lost)
* data. -GD
+ * This used is_sync(serv_uplink) to check for sync states. There's
+ * only a minor error with this: serv_uplink doesn't exist during
+ * the first save. So now we check for serv_uplink only; if it
+ * exists we're safe. -GD
*/
- if (!is_sync(serv_uplink))
+ if (serv_uplink)
anope_cmd_pong(ServerName, ServerName);
waiting = -12;
save_cs_rdb_dbase();
- if (!is_sync(serv_uplink))
+ if (serv_uplink)
anope_cmd_pong(ServerName, ServerName);
if (PreNickDBName) {
save_ns_req_rdb_dbase();
- if (!is_sync(serv_uplink))
+ if (serv_uplink)
anope_cmd_pong(ServerName, ServerName);
waiting = -13;
}
if (s_BotServ) {
waiting = -14;
save_bs_rdb_dbase();
- if (!is_sync(serv_uplink))
+ if (serv_uplink)
anope_cmd_pong(ServerName, ServerName);
}
if (s_HostServ) {
waiting = -15;
save_hs_rdb_dbase();
- if (!is_sync(serv_uplink))
+ if (serv_uplink)
anope_cmd_pong(ServerName, ServerName);
}
waiting = -16;
save_os_rdb_dbase();
- if (!is_sync(serv_uplink))
+ if (serv_uplink)
anope_cmd_pong(ServerName, ServerName);
waiting = -17;
save_rdb_news();
- if (!is_sync(serv_uplink))
+ if (serv_uplink)
anope_cmd_pong(ServerName, ServerName);
waiting = -18;
save_rdb_exceptions();
- if (!is_sync(serv_uplink))
+ if (serv_uplink)
anope_cmd_pong(ServerName, ServerName);
}