mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-07-04 16:53:15 +02:00
- Fixed (important?) reference count bug regarding sptr->serv->conf. I don't know what
effects this caused (memory corruption?), but it didn't look good ;).
This commit is contained in:
+10
-3
@@ -179,9 +179,16 @@ DLLFUNC CMD_FUNC(m_server)
|
||||
strcpy(xerrmsg, "Null servername");
|
||||
goto errlink;
|
||||
}
|
||||
for(link = conf_link; link; link = (ConfigItem_link *) link->next)
|
||||
if (!match(link->servername, servername))
|
||||
break;
|
||||
if (cptr->serv && cptr->serv->conf)
|
||||
{
|
||||
/* We already know what block we are dealing with (outgoing connect!) */
|
||||
link = cptr->serv->conf;
|
||||
} else {
|
||||
/* Hunt the linkblock down ;) */
|
||||
for(link = conf_link; link; link = (ConfigItem_link *) link->next)
|
||||
if (!match(link->servername, servername))
|
||||
break;
|
||||
}
|
||||
if (!link) {
|
||||
snprintf(xerrmsg, 256, "No link block named '%s'", servername);
|
||||
goto errlink;
|
||||
|
||||
Reference in New Issue
Block a user