1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-09 17:43:12 +02:00

fixed reference count bug (also comitted to unreal3_2_fixes).

This commit is contained in:
Bram Matthys
2005-09-12 16:34:42 +00:00
parent f31b959ff5
commit 0f4443efd0
2 changed files with 11 additions and 0 deletions
+2
View File
@@ -560,7 +560,9 @@ void Unload_all_loaded_modules(void)
}
DelListItem(mi,Modules);
irc_dlclose(mi->dll);
#ifndef DEBUGMODE
remove(mi->tmp_file);
#endif
MyFree(mi->tmp_file);
MyFree(mi);
}
+9
View File
@@ -2360,6 +2360,11 @@ int connect_server(ConfigItem_link *aconf, aClient *by, struct hostent *hp)
char *s;
int errtmp, len;
#ifdef DEBUGMODE
sendto_realops("connect_server() called with aconf %p, refcount: %d, TEMP: %s",
aconf, aconf->refcount, aconf->flag.temporary ? "YES" : "NO");
#endif
if (aconf->options & CONNECT_NODNSCACHE) {
/* Remove "cache" if link::options::nodnscache is set */
memset(&aconf->ipnum, '\0', sizeof(struct IN_ADDR));
@@ -2441,6 +2446,10 @@ int connect_server(ConfigItem_link *aconf, aClient *by, struct hostent *hp)
(void)make_server(cptr);
cptr->serv->conf = aconf;
cptr->serv->conf->refcount++;
#ifdef DEBUGMODE
sendto_realops("connect_server() CONTINUED (%s:%d), aconf %p, refcount: %d, TEMP: %s",
__FILE__, __LINE__, aconf, aconf->refcount, aconf->flag.temporary ? "YES" : "NO");
#endif
Debug((DEBUG_ERROR, "reference count for %s (%s) is now %d",
cptr->name, cptr->serv->conf->servername, cptr->serv->conf->refcount));
if (by && IsPerson(by))