diff options
author | FlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-11-08 14:08:32 +0000 |
---|---|---|
committer | FlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-11-08 14:08:32 +0000 |
commit | b5be01c5baca2d51da4ec9a138e3bb57eea7cbb4 (patch) | |
tree | b7f079f5317d736e49fdf8b12f6d3f18b2a98daf /src/char_sql/char.c | |
parent | ad2a3a12e2d603e8ef2011d1121271b7ed2f05eb (diff) | |
download | hercules-b5be01c5baca2d51da4ec9a138e3bb57eea7cbb4.tar.gz hercules-b5be01c5baca2d51da4ec9a138e3bb57eea7cbb4.tar.bz2 hercules-b5be01c5baca2d51da4ec9a138e3bb57eea7cbb4.tar.xz hercules-b5be01c5baca2d51da4ec9a138e3bb57eea7cbb4.zip |
* 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
Diffstat (limited to 'src/char_sql/char.c')
-rw-r--r-- | src/char_sql/char.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/char_sql/char.c b/src/char_sql/char.c index 5c6040cf2..89f31e2c1 100644 --- a/src/char_sql/char.c +++ b/src/char_sql/char.c @@ -64,7 +64,7 @@ char friend_db[256] = "friends"; char hotkey_db[256] = "hotkey"; #ifndef TXT_SQL_CONVERT -static struct dbt *char_db_; +static DBMap* char_db_; // int char_id -> struct mmo_charstatus* char db_path[1024] = "db"; @@ -192,7 +192,8 @@ struct online_char_data { short server; // -2: unknown server, -1: not connected, 0+: id of server }; -struct dbt* online_char_db; //Holds all online characters. +// Holds all online characters. +DBMap* online_char_db; // int account_id -> struct online_char_data* static void* create_online_char_data(DBKey key, va_list args) { @@ -1066,7 +1067,7 @@ int mmo_char_fromsql(int char_id, struct mmo_charstatus* p, bool load_everything int mmo_char_sql_init(void) { ShowInfo("Begin Initializing.......\n"); - char_db_= db_alloc(__FILE__,__LINE__,DB_INT,DB_OPT_RELEASE_DATA, sizeof(int)); + char_db_= idb_alloc(DB_OPT_RELEASE_DATA); if(char_per_account == 0){ ShowStatus("Chars per Account: 'Unlimited'.......\n"); @@ -3771,7 +3772,7 @@ int do_init(int argc, char **argv) ShowInfo("Finished reading the inter-server configuration.\n"); ShowInfo("Initializing char server.\n"); - online_char_db = db_alloc(__FILE__,__LINE__,DB_INT,DB_OPT_RELEASE_DATA,sizeof(int)); + online_char_db = idb_alloc(DB_OPT_RELEASE_DATA); mmo_char_sql_init(); char_read_fame_list(); //Read fame lists. if(char_gm_read) |