mirror of
https://github.com/anope/anope.git
synced 2026-07-05 09:13:15 +02:00
BUILD : 1.7.8 (655) BUGS : NOTES : We need to update the sync-state for leaf servers as well, or strange things will happen...
git-svn-id: svn://svn.anope.org/anope/trunk@655 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@503 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
parent
b738b7d6bc
commit
d31359dcdc
@@ -10,6 +10,7 @@ Provided by Anope Dev. <dev@anope.org> - 2005
|
||||
02/13 A Internal Event support, see EVENTS in the doc folder for help [ #00]
|
||||
02/05 A Support for Unreal 3.2 +I channel mode. [ #00]
|
||||
02/03 A Merged anope-win32 branch into the main, now Win32 ready. [ #00]
|
||||
04/01 F Sync state for leaf-servers not updated correctly. [ #00]
|
||||
03/30 F ChanServ now sets topic again when channel is re-created. [#339]
|
||||
03/29 F Changed anoperc script to use kill numerics for compliance. [ #00]
|
||||
03/28 F Moved where GlobalOnCycleUP is located so it now works. [#336]
|
||||
|
||||
@@ -833,6 +833,8 @@ E void do_squit(const char *source, int ac, char **av);
|
||||
E void capab_parse(int ac, char **av);
|
||||
E int anope_check_sync(const char *name);
|
||||
|
||||
E void finish_sync(Server *serv, int sync_links);
|
||||
|
||||
/**** sessions.c ****/
|
||||
|
||||
E Exception *exceptions;
|
||||
|
||||
+3
-5
@@ -1619,11 +1619,9 @@ int anope_event_burst(char *source, int ac, char **av)
|
||||
* finished bursting. If there was no source, then our uplink
|
||||
* server finished bursting. -GD
|
||||
*/
|
||||
if (s)
|
||||
s->sync = SSYNC_DONE;
|
||||
else if (serv_uplink)
|
||||
serv_uplink->sync = SSYNC_DONE;
|
||||
restore_unsynced_topics();
|
||||
if (!s && serv_uplink)
|
||||
s = serv_uplink;
|
||||
finish_sync(s, 1);
|
||||
}
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
+3
-5
@@ -933,11 +933,9 @@ int anope_event_eob(char *source, int ac, char **av)
|
||||
* finished bursting. If there was no source, then our uplink
|
||||
* server finished bursting. -GD
|
||||
*/
|
||||
if (s)
|
||||
s->sync = SSYNC_DONE;
|
||||
else if (serv_uplink)
|
||||
serv_uplink->sync = SSYNC_DONE;
|
||||
restore_unsynced_topics();
|
||||
if (!s && serv_uplink)
|
||||
s = serv_uplink;
|
||||
finish_sync(s, 1);
|
||||
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
+3
-5
@@ -1015,11 +1015,9 @@ int anope_event_eob(char *source, int ac, char **av)
|
||||
* finished bursting. If there was no source, then our uplink
|
||||
* server finished bursting. -GD
|
||||
*/
|
||||
if (s)
|
||||
s->sync = SSYNC_DONE;
|
||||
else if (serv_uplink)
|
||||
serv_uplink->sync = SSYNC_DONE;
|
||||
restore_unsynced_topics();
|
||||
if (!s && serv_uplink)
|
||||
s = serv_uplink;
|
||||
finish_sync(s, 1);
|
||||
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
+3
-5
@@ -593,11 +593,9 @@ int anope_event_burst(char *source, int ac, char **av)
|
||||
* finished bursting. If there was no source, then our uplink
|
||||
* server finished bursting. -GD
|
||||
*/
|
||||
if (s)
|
||||
s->sync = SSYNC_DONE;
|
||||
else if (serv_uplink)
|
||||
serv_uplink->sync = SSYNC_DONE;
|
||||
restore_unsynced_topics();
|
||||
if (!s && serv_uplink)
|
||||
s = serv_uplink;
|
||||
finish_sync(s, 1);
|
||||
}
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
@@ -550,4 +550,54 @@ int is_sync(Server * server)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
/* Finish the syncing process for this server and (optionally) for all
|
||||
* it's leaves as well
|
||||
* @param serv Server to finish syncing
|
||||
* @param sync_links Should all leaves be synced as well? (1: yes, 0: no)
|
||||
* @return void
|
||||
*/
|
||||
void finish_sync(Server * serv, int sync_links)
|
||||
{
|
||||
Server *s;
|
||||
|
||||
if (!serv || is_sync(serv))
|
||||
return;
|
||||
|
||||
/* Mark each server as in sync */
|
||||
s = serv;
|
||||
do {
|
||||
if (!is_sync(s)) {
|
||||
if (debug)
|
||||
alog("Finishing sync for server %s", s->name);
|
||||
|
||||
s->sync = SSYNC_DONE;
|
||||
}
|
||||
|
||||
if (!sync_links)
|
||||
break;
|
||||
|
||||
if (s->links) {
|
||||
s = s->links;
|
||||
} else if (s->next) {
|
||||
s = s->next;
|
||||
} else {
|
||||
do {
|
||||
s = s->uplink;
|
||||
if (s == serv)
|
||||
s = NULL;
|
||||
if (s == me_server)
|
||||
s = NULL;
|
||||
} while (s && !(s->next));
|
||||
if (s)
|
||||
s = s->next;
|
||||
}
|
||||
} while (s);
|
||||
|
||||
/* Do some general stuff which should only be done once */
|
||||
restore_unsynced_topics();
|
||||
alog("Server %s is done syncing", serv->name);
|
||||
}
|
||||
|
||||
/* EOF */
|
||||
|
||||
+3
-5
@@ -1176,11 +1176,9 @@ int anope_event_eos(char *source, int ac, char **av)
|
||||
* finished bursting. If there was no source, then our uplink
|
||||
* server finished bursting. -GD
|
||||
*/
|
||||
if (s)
|
||||
s->sync = SSYNC_DONE;
|
||||
else if (serv_uplink)
|
||||
serv_uplink->sync = SSYNC_DONE;
|
||||
restore_unsynced_topics();
|
||||
if (!s && serv_uplink)
|
||||
s = serv_uplink;
|
||||
finish_sync(s, 1);
|
||||
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
+3
-5
@@ -1653,11 +1653,9 @@ int anope_event_burst(char *source, int ac, char **av)
|
||||
* finished bursting. If there was no source, then our uplink
|
||||
* server finished bursting. -GD
|
||||
*/
|
||||
if (s)
|
||||
s->sync = SSYNC_DONE;
|
||||
else if (serv_uplink)
|
||||
serv_uplink->sync = SSYNC_DONE;
|
||||
restore_unsynced_topics();
|
||||
if (!s && serv_uplink)
|
||||
s = serv_uplink;
|
||||
finish_sync(s, 1);
|
||||
}
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
+3
-5
@@ -1746,11 +1746,9 @@ int anope_event_eob(char *source, int ac, char **av)
|
||||
* finished bursting. If there was no source, then our uplink
|
||||
* server finished bursting. -GD
|
||||
*/
|
||||
if (s)
|
||||
s->sync = SSYNC_DONE;
|
||||
else if (serv_uplink)
|
||||
serv_uplink->sync = SSYNC_DONE;
|
||||
restore_unsynced_topics();
|
||||
if (!s && serv_uplink)
|
||||
s = serv_uplink;
|
||||
finish_sync(s, 1);
|
||||
}
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
+3
-5
@@ -1574,11 +1574,9 @@ int anope_event_eos(char *source, int ac, char **av)
|
||||
* finished bursting. If there was no source, then our uplink
|
||||
* server finished bursting. -GD
|
||||
*/
|
||||
if (s)
|
||||
s->sync = SSYNC_DONE;
|
||||
else if (serv_uplink)
|
||||
serv_uplink->sync = SSYNC_DONE;
|
||||
restore_unsynced_topics();
|
||||
if (!s && serv_uplink)
|
||||
s = serv_uplink;
|
||||
finish_sync(s, 1);
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
|
||||
+3
-5
@@ -643,11 +643,9 @@ int anope_event_burst(char *source, int ac, char **av)
|
||||
* finished bursting. If there was no source, then our uplink
|
||||
* server finished bursting. -GD
|
||||
*/
|
||||
if (s)
|
||||
s->sync = SSYNC_DONE;
|
||||
else if (serv_uplink)
|
||||
serv_uplink->sync = SSYNC_DONE;
|
||||
restore_unsynced_topics();
|
||||
if (!s && serv_uplink)
|
||||
s = serv_uplink;
|
||||
finish_sync(s, 1);
|
||||
}
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
+5
-1
@@ -8,10 +8,14 @@
|
||||
VERSION_MAJOR="1"
|
||||
VERSION_MINOR="7"
|
||||
VERSION_PATCH="8"
|
||||
VERSION_BUILD="654"
|
||||
VERSION_BUILD="655"
|
||||
|
||||
# $Log$
|
||||
#
|
||||
# BUILD : 1.7.8 (655)
|
||||
# BUGS :
|
||||
# NOTES : We need to update the sync-state for leaf servers as well, or strange things will happen...
|
||||
#
|
||||
# BUILD : 1.7.8 (654)
|
||||
# BUGS :
|
||||
# NOTES : DrSteins Makefile Patches...
|
||||
|
||||
Reference in New Issue
Block a user