diff options
author | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2010-04-22 19:40:58 +0000 |
---|---|---|
committer | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2010-04-22 19:40:58 +0000 |
commit | 531cba9251d2b7963f34047d5587678e3da076da (patch) | |
tree | 5330581b8b6392f51799c3fcfccafbac17163dd1 /src/botserv.c | |
parent | 752e87a9f0aa58a982949a95d7512801cc26fc00 (diff) |
Actually use readtimeout from the config & fixed many valgrind errors
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2905 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/botserv.c')
-rw-r--r-- | src/botserv.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/botserv.c b/src/botserv.c index 5d4173d20..3f535783a 100644 --- a/src/botserv.c +++ b/src/botserv.c @@ -585,17 +585,17 @@ static UserData *get_user_data(Channel *c, User *u) time_t now = time(NULL); /* Checks whether data is obsolete */ - if (now - uc->ud->last_use > Config.BSKeepData) + if (now - uc->ud.last_use > Config.BSKeepData) { - if (uc->ud->lastline) - delete [] uc->ud->lastline; + if (uc->ud.lastline) + delete [] uc->ud.lastline; /* We should not free and realloc, but reset to 0 instead. */ - memset(uc->ud, 0, sizeof(UserData)); - uc->ud->last_use = now; + memset(&uc->ud, 0, sizeof(UserData)); + uc->ud.last_use = now; } - return uc->ud; + return &uc->ud; } } |