From 7e72f0cee8867837be53cb2119b610b00e9bd587 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Mon, 18 Feb 2013 00:30:28 -0300 Subject: Improvements all over the place Committing on the behalf of mkbu95 who is unable to do it himself, he coded it all and sent me the diff. Thanks mkbu95! Signed-off-by: shennetsind --- src/login/account_sql.c | 2 +- src/login/login.c | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'src/login') diff --git a/src/login/account_sql.c b/src/login/account_sql.c index ae80163af..f89147334 100644 --- a/src/login/account_sql.c +++ b/src/login/account_sql.c @@ -486,7 +486,6 @@ static bool account_db_sql_iter_next(AccountDBIterator* self, struct mmo_account AccountDBIterator_SQL* iter = (AccountDBIterator_SQL*)self; AccountDB_SQL* db = (AccountDB_SQL*)iter->db; Sql* sql_handle = db->accounts; - int account_id; char* data; // get next account ID @@ -501,6 +500,7 @@ static bool account_db_sql_iter_next(AccountDBIterator* self, struct mmo_account SQL_SUCCESS == Sql_GetData(sql_handle, 0, &data, NULL) && data != NULL ) {// get account data + int account_id; account_id = atoi(data); if( mmo_auth_fromsql(db, acc, account_id) ) { diff --git a/src/login/login.c b/src/login/login.c index 1ced8cb93..54f066b53 100644 --- a/src/login/login.c +++ b/src/login/login.c @@ -1606,10 +1606,11 @@ int login_config_read(const char* cfgName) ShowInfo("Console Silent Setting: %d\n", atoi(w2)); } else if( !strcmpi(w1, "bind_ip") ) { - char ip_str[16]; login_config.login_ip = host2ip(w2); - if( login_config.login_ip ) + if( login_config.login_ip ) { + char ip_str[16]; ShowStatus("Login server binding IP address : %s -> %s\n", w2, ip2str(login_config.login_ip, ip_str)); + } } else if( !strcmpi(w1, "login_port") ) { login_config.login_port = (uint16)atoi(w2); @@ -1654,10 +1655,10 @@ int login_config_read(const char* cfgName) else if(!strcmpi(w1, "client_hash")) { int group = 0; char md5[33]; - int i; if (sscanf(w2, "%d, %32s", &group, md5) == 2) { struct client_hash_node *nnode; + int i; CREATE(nnode, struct client_hash_node, 1); for (i = 0; i < 32; i += 2) { -- cgit v1.2.3-70-g09d2