mirror of
https://github.com/pissnet/pissircd.git
synced 2025-08-16 07:01:35 +01:00
+- Fixed temporary stuf with conf_link
This commit is contained in:
parent
a3d4c1af6e
commit
e0588102ac
3 changed files with 23 additions and 8 deletions
1
Changes
1
Changes
|
@ -200,3 +200,4 @@
|
|||
- Made /rehash work .. sortof. Fixed some crash bugs
|
||||
- Added /stats P on listener info (oper-only)
|
||||
- listener temporary stuff works now
|
||||
- Fixed temporary stuf with conf_link
|
|
@ -1957,6 +1957,19 @@ void run_configuration(void)
|
|||
}
|
||||
}
|
||||
|
||||
void link_cleanup(ConfigItem_link *link_ptr)
|
||||
{
|
||||
ircfree(link_ptr->servername);
|
||||
ircfree(link_ptr->username);
|
||||
ircfree(link_ptr->bindip);
|
||||
ircfree(link_ptr->hostname);
|
||||
ircfree(link_ptr->hubmask);
|
||||
ircfree(link_ptr->leafmask);
|
||||
ircfree(link_ptr->connpwd);
|
||||
ircfree(link_ptr->recvpwd);
|
||||
}
|
||||
|
||||
|
||||
void listen_cleanup()
|
||||
{
|
||||
int i = 0;
|
||||
|
@ -2072,14 +2085,7 @@ int rehash(cptr, sptr, sig)
|
|||
{
|
||||
if (link_ptr->refcount == 0)
|
||||
{
|
||||
ircfree(link_ptr->servername);
|
||||
ircfree(link_ptr->username);
|
||||
ircfree(link_ptr->bindip);
|
||||
ircfree(link_ptr->hostname);
|
||||
ircfree(link_ptr->hubmask);
|
||||
ircfree(link_ptr->leafmask);
|
||||
ircfree(link_ptr->connpwd);
|
||||
ircfree(link_ptr->recvpwd);
|
||||
link_cleanup(link_ptr);
|
||||
t.next = del_ConfigItem((ConfigItem *) link_ptr, (ConfigItem **)&conf_link);
|
||||
MyFree(link_ptr);
|
||||
link_ptr = (ConfigItem_link *) &t;
|
||||
|
|
|
@ -449,6 +449,14 @@ int exit_client(cptr, sptr, from, comment)
|
|||
{
|
||||
IRCstats.me_servers--;
|
||||
sptr->serv->conf->refcount--;
|
||||
if (!sptr->serv->conf->refcount
|
||||
&& sptr->serv->conf->flag.temporary)
|
||||
{
|
||||
/* Due for deletion */
|
||||
del_ConfigItem((ConfigItem *) sptr->serv->conf, (ConfigItem **)&conf_link);
|
||||
link_cleanup(sptr->serv->conf);
|
||||
MyFree(sptr->serv->conf);
|
||||
}
|
||||
}
|
||||
|
||||
if (sptr->listener)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue