1
0
mirror of https://github.com/anope/anope.git synced 2026-07-10 09:43:13 +02:00

BUILD : 1.7.19 (1274) BUGS : 764 NOTES : Fixed firstuser/nextuser and first_uid/next_uid using the same globals thus being unable to be used at the same time

git-svn-id: svn://svn.anope.org/anope/trunk@1274 31f1291d-b8d6-0310-a050-a5561fc1590b


git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@992 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b
2007-08-27 18:12:31 +00:00
parent f9f5c677cc
commit 1576ab143b
3 changed files with 25 additions and 15 deletions
+1
View File
@@ -15,6 +15,7 @@ Anope Version S V N
08/11 F CAPAB tokens for InspIRCd 1.1 never parsed. [#742]
08/21 F Updated the WIN32.txt document a bit [ #00]
08/21 F Re-worded the CHAN_LEVELS_XOP string in en_us [ #00]
08/27 F Functions firstuser and first_uid now don't collide when used. [#764]
Anope Version 1.7.19
--------------------
+19 -14
View File
@@ -350,6 +350,7 @@ static int next_index;
User *firstuser(void)
{
next_index = 0;
current = NULL;
while (next_index < 1024 && current == NULL)
current = userlist[next_index++];
if (debug)
@@ -395,34 +396,38 @@ User *find_byuid(const char *uid)
return NULL;
}
static User *current_uid;
static int next_index_uid;
User *first_uid(void)
{
next_index = 0;
while (next_index < 1024 && current == NULL) {
current = userlist[next_index++];
next_index_uid = 0;
current_uid = NULL;
while (next_index_uid < 1024 && current_uid == NULL) {
current_uid = userlist[next_index_uid++];
}
if (debug >= 2) {
alog("debug: first_uid() returning %s %s",
current ? current->nick : "NULL (end of list)",
current ? current->uid : "");
current_uid ? current_uid->nick : "NULL (end of list)",
current_uid ? current_uid->uid : "");
}
return current;
return current_uid;
}
User *next_uid(void)
{
if (current)
current = current->next;
if (!current && next_index < 1024) {
while (next_index < 1024 && current == NULL)
current = userlist[next_index++];
if (current_uid)
current_uid = current_uid->next;
if (!current_uid && next_index_uid < 1024) {
while (next_index_uid < 1024 && current_uid == NULL)
current_uid = userlist[next_index_uid++];
}
if (debug >= 2) {
alog("debug: next_uid() returning %s %s",
current ? current->nick : "NULL (end of list)",
current ? current->uid : "");
current_uid ? current_uid->nick : "NULL (end of list)",
current_uid ? current_uid->uid : "");
}
return current;
return current_uid;
}
Uid *new_uid(const char *nick, char *uid)
+5 -1
View File
@@ -9,10 +9,14 @@ VERSION_MAJOR="1"
VERSION_MINOR="7"
VERSION_PATCH="19"
VERSION_EXTRA="-svn"
VERSION_BUILD="1273"
VERSION_BUILD="1274"
# $Log$
#
# BUILD : 1.7.19 (1274)
# BUGS : 764
# NOTES : Fixed firstuser/nextuser and first_uid/next_uid using the same globals thus being unable to be used at the same time
#
# BUILD : 1.7.19 (1273)
# BUGS :
# NOTES : Updated src/bin/am to now correctly work with multiversioned repositories as reported by svnversion