summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changes2
-rw-r--r--src/servers.c30
-rw-r--r--version.log3
3 files changed, 23 insertions, 12 deletions
diff --git a/Changes b/Changes
index 2436f97d6..b8b3abc84 100644
--- a/Changes
+++ b/Changes
@@ -4,6 +4,8 @@ Provided by Anope Dev. <team@anope.org> - 2009
07/31 F Fixed anope sending umode change using channels' syntax. [ #00]
07/31 F Fixed TS6 UUID issue while parsing modechanges. [ #00]
08/01 F Fixed several memory leaks in HostServ. [ #00]
+08/01 F Fixed several memory leaks in HostServ. [ #00]
+08/03 F Fixed TS6 SID issue when introducing new servers. [ #00]
Provided by Han` <Han@mefalcon.org> - 2009
07/28 F Updated german language file. [ #00]
diff --git a/src/servers.c b/src/servers.c
index 8aa5b2a12..cf872512f 100644
--- a/src/servers.c
+++ b/src/servers.c
@@ -122,6 +122,10 @@ Server *new_server(Server * uplink, const char *name, const char *desc,
{
Server *serv;
+ if (debug)
+ alog("debug: Creating %s(%s) uplinked to %s", name, suid ? suid : "",
+ uplink ? uplink->name : "No uplink");
+
serv = scalloc(sizeof(Server), 1);
if (!name)
name = "";
@@ -155,10 +159,10 @@ Server *new_server(Server * uplink, const char *name, const char *desc,
uplink->links = serv;
}
/* Check if this is our uplink server */
- if ((uplink == me_server) && !(flags & SERVER_JUPED)) {
+ if ((uplink == me_server) && !(flags & SERVER_JUPED)) {
serv_uplink = serv;
- serv->flags |= SERVER_ISUPLINK;
- }
+ serv->flags |= SERVER_ISUPLINK;
+ }
/* Write the StartGlobal (to non-juped servers) */
if (GlobalOnCycle && GlobalOnCycleUP && !(flags & SERVER_JUPED))
@@ -186,14 +190,15 @@ static void delete_server(Server * serv, const char *quitreason)
NickAlias *na;
if (!serv) {
- if (debug) {
+ if (debug)
alog("debug: delete_server() called with NULL arg!");
- }
return;
}
if (debug)
- alog("debug: delete_server() called for %s", serv->name);
+ alog("debug: Deleting %s(%s) uplinked to %s(%s)", serv->name,
+ serv->suid ? serv->suid : "", serv->uplink ? serv->uplink->name : "???",
+ serv->uplink ? serv->uplink->suid : "");
if (ircdcap->noquit || ircdcap->qs) {
if ((uplink_capab & ircdcap->noquit)
@@ -366,12 +371,18 @@ void do_server(const char *source, char *servername, char *hops,
source);
}
}
-
if (source[0] == '\0')
s = me_server;
- else
+ else if (UseTS6 && ircd->ts6) {
+ s = findserver_uid(servlist, source);
+ if (!s)
+ s = findserver(servlist, source);
+ } else
s = findserver(servlist, source);
+ if (!s)
+ fatal("FATAL ERROR: Received new server from nonexistant uplink.");
+
new_server(s, servername, descript, 0, numeric);
send_event(EVENT_SERVER_CONNECT, 1, servername);
}
@@ -573,9 +584,6 @@ static unsigned int ts6_uid_index = 9; /* last slot in uid buf */
void ts6_uid_init(void)
{
- unsigned int i;
- char buf[BUFSIZE];
-
/* check just in case... you can never be too safe. */
if (TS6SID != NULL) {
snprintf(ts6_new_uid, 10, "%sAAAAAA", TS6SID);
diff --git a/version.log b/version.log
index e1e9f6a23..2797d3049 100644
--- a/version.log
+++ b/version.log
@@ -9,9 +9,10 @@ VERSION_MAJOR="1"
VERSION_MINOR="8"
VERSION_PATCH="2"
VERSION_EXTRA="-svn"
-VERSION_BUILD="2401"
+VERSION_BUILD="2402"
# $Log$ # Changes since 1.8.2 Release
+#Revision 2402 - Fixed do_server() so it doesn't go nuts if a SID is the source. Added some sanity checks and debug output as well.
#Revision 2401 - Added forgotten entries to version.log and Changes, some code cleanup and fixed a few minor TS6 issues.
#Revision 2400 - Fixed some memory leaks when setting vhosts on users.
#Revision 2398 - Fixed a TS6 bug in chan_set_modes() causing restrictions such as secureops to fail if the IRCd sends UUIDs instead of nicks.