Issue Information
-
#001772
-
2 - Fair
-
Confirmed
Issue Confirmations
-
Yes (0)No (0)
Originally posted by theultramage
http://www.eathena.w...er&showbug=1772
Hm.
then
finally
What's the point of all this juggling when everything is in the id_db and the last line can free everything?
http://www.eathena.w...er&showbug=1772
Hm.
CODE
for (i = 0; i < map_num; i++)
if (map[i].m >= 0)
map_foreachinmap(cleanup_sub, i, BL_ALL);
if (map[i].m >= 0)
map_foreachinmap(cleanup_sub, i, BL_ALL);
then
CODE
//Scan any remaining players (between maps?) to kick them out. [Skotlex]
iter = mapit_getallusers();
for( sd = (TBL_PC*)mapit_first(iter); mapit_exists(iter); sd = (TBL_PC*)mapit_next(iter) )
map_quit(sd);
mapit_free(iter);
iter = mapit_getallusers();
for( sd = (TBL_PC*)mapit_first(iter); mapit_exists(iter); sd = (TBL_PC*)mapit_next(iter) )
map_quit(sd);
mapit_free(iter);
finally
CODE
id_db->foreach(id_db,cleanup_db_sub);
static int cleanup_db_sub(DBKey key,void *data,va_list va)
{
return cleanup_sub((struct block_list*)data, NULL);
}
static int cleanup_db_sub(DBKey key,void *data,va_list va)
{
return cleanup_sub((struct block_list*)data, NULL);
}
What's the point of all this juggling when everything is in the id_db and the last line can free everything?