From b5be01c5baca2d51da4ec9a138e3bb57eea7cbb4 Mon Sep 17 00:00:00 2001 From: FlavioJS Date: Thu, 8 Nov 2007 14:08:32 +0000 Subject: * Changed EXIT_SUCCESS back to 0 in console.c to avoid an unnecessary include. * Fixed gm_account_db not being deallocated in login-converter.c. * Refactoring names and documentation in db.h/db.c: - changed 'struct dbt' to 'struct DBMap' and 'DB' to 'DBMap*' - changed 'struct db' to 'struct DBMap_impl' and 'DB_impl' to 'DBMap_impl*' - changed COUNT to DB_COUNTSTAT and made it's existence not depend on DB_ENABLE_STATS - removed some @see links and corrected small typos in the documentation git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11698 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/chrif.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/map/chrif.c') diff --git a/src/map/chrif.c b/src/map/chrif.c index 0ea1e06a9..6369a6745 100644 --- a/src/map/chrif.c +++ b/src/map/chrif.c @@ -25,7 +25,7 @@ #include #include -struct dbt *auth_db; +DBMap* auth_db; // int id -> struct auth_node* static const int packet_len_table[0x3d] = { // U - used, F - free 60, 3,-1,27,10,-1, 6,-1, // 2af8-2aff: U->2af8, U->2af9, U->2afa, U->2afb, U->2afc, U->2afd, U->2afe, U->2aff @@ -430,7 +430,7 @@ void chrif_authreq(struct map_session_data *sd) auth_data->account_id = sd->bl.id; auth_data->login_id1 = sd->login_id1; auth_data->node_created = gettick(); - uidb_put(auth_db, sd->bl.id, auth_data); + idb_put(auth_db, sd->bl.id, auth_data); } return; } @@ -451,7 +451,7 @@ void chrif_authok(int fd) return; } - if ((auth_data =uidb_get(auth_db, RFIFOL(fd, 4))) != NULL) + if ((auth_data =idb_get(auth_db, RFIFOL(fd, 4))) != NULL) { //Is the character already awaiting authorization? if (auth_data->sd) { @@ -472,7 +472,7 @@ void chrif_authok(int fd) //Delete the data of this node... if (auth_data->char_dat) aFree (auth_data->char_dat); - uidb_remove(auth_db, RFIFOL(fd, 4)); + idb_remove(auth_db, RFIFOL(fd, 4)); return; } // Awaiting for client to connect. @@ -485,7 +485,7 @@ void chrif_authok(int fd) auth_data->login_id2=RFIFOL(fd, 16); memcpy(auth_data->char_dat,RFIFOP(fd, 20),sizeof(struct mmo_charstatus)); auth_data->node_created=gettick(); - uidb_put(auth_db, RFIFOL(fd, 4), auth_data); + idb_put(auth_db, RFIFOL(fd, 4), auth_data); } int auth_db_cleanup_sub(DBKey key,void *data,va_list ap) @@ -1445,7 +1445,7 @@ int do_init_chrif(void) #endif add_timer_interval(gettick() + 1000, auth_db_cleanup, 0, 0, 30 * 1000); - auth_db = db_alloc(__FILE__,__LINE__,DB_INT,DB_OPT_RELEASE_DATA,sizeof(int)); + auth_db = idb_alloc(DB_OPT_RELEASE_DATA); return 0; } -- cgit v1.2.3-60-g2f50