diff options
author | shennetsind <ind@henn.et> | 2013-02-18 00:30:28 -0300 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2013-02-18 00:30:28 -0300 |
commit | 7e72f0cee8867837be53cb2119b610b00e9bd587 (patch) | |
tree | 22ab404109fb2def22cf0085fcec2bf174210970 /src/login | |
parent | 237d76e7c409251b5fdb9f3eee40ef3fe5dc2b25 (diff) | |
download | hercules-7e72f0cee8867837be53cb2119b610b00e9bd587.tar.gz hercules-7e72f0cee8867837be53cb2119b610b00e9bd587.tar.bz2 hercules-7e72f0cee8867837be53cb2119b610b00e9bd587.tar.xz hercules-7e72f0cee8867837be53cb2119b610b00e9bd587.zip |
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 <ind@henn.et>
Diffstat (limited to 'src/login')
-rw-r--r-- | src/login/account_sql.c | 2 | ||||
-rw-r--r-- | src/login/login.c | 7 |
2 files changed, 5 insertions, 4 deletions
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) { |