Jump to content

  •  

Bug Tracker Migration

June 3rd
Good news everyone! The staff has decided that it is time to slowly kill off this Bug Tracker. We will begin the process of slowly migrating from this Bug Tracker over to our Github Issues which can be found here: https://github.com/HerculesWS/Hercules/issues

Over the next couple of days, I will be closing off any opportunity to create new reports. However, I still will keep the opportunity to reply to existing Bug Reports. Doing this will allow us to slowly fix any bug reports we have listed here so that we can easily migrate over to our Issue Tracker.

Update - June 7th 2015: Creating new bug posts has been disabled. Please use our https://github.com/HerculesWS/Hercules/issues tracker to post bugs. Users are still able to reply to existing bug posts.

- Administration

Issue Information

Issue Confirmations

  • Yes (0)No (0)
Photo

Mapserver Shutdown Data Unloading Cleanup

Posted by Hercules Bot on 25 June 2008 - 10:53 AM

Originally posted by theultramage
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);

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);

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);
}

What's the point of all this juggling when everything is in the id_db and the last line can free everything?