Przeglądaj źródła

- Fixed the IP value being apparently incorrectly casted before inserting into the loginlog table on "connect success" events.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7634 54d463be-8e91-2dee-dedb-b68131a5f0ec
skotlex 19 lat temu
rodzic
commit
670bd31159
3 zmienionych plików z 4 dodań i 2 usunięć
  1. 2 0
      Changelog-Trunk.txt
  2. 1 1
      src/login_sql/login.c
  3. 1 1
      src/map/storage.c

+ 2 - 0
Changelog-Trunk.txt

@@ -4,6 +4,8 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK.  ALL UNTESTED BUGFIXES/FEATURES GO
 IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
 
 2006/07/12
+	* Fixed the IP value being apparently incorrectly casted before inserting
+	  into the loginlog table on "connect success" events. [Skotlex]
 	* Fixed Cart Termination's damage. [Skotlex]
 	* Added the missing check to remove character from memory when logging out
 	  and using the charsave_method which saves character map-server-side.

+ 1 - 1
src/login_sql/login.c

@@ -1595,7 +1595,7 @@ int parse_login(int fd) {
 				} else {
 
 					if (p[0] != 127 && log_login) {
-						sprintf(tmpsql,"INSERT DELAYED INTO `%s`(`time`,`ip`,`user`,`rcode`,`log`) VALUES (NOW(), '%lu', '%s','100', 'login ok')", loginlog_db, (ulong)p, t_uid);
+						sprintf(tmpsql,"INSERT DELAYED INTO `%s`(`time`,`ip`,`user`,`rcode`,`log`) VALUES (NOW(), '%lu', '%s','100', 'login ok')", loginlog_db, *((ulong *)p), t_uid);
 						//query
 						if(mysql_query(&mysql_handle, tmpsql)) {
 							ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));

+ 1 - 1
src/map/storage.c

@@ -718,8 +718,8 @@ int storage_guild_storageclose(struct map_session_data *sd)
 			chrif_save(sd, 0); //This one also saves the storage. [Skotlex]
 		else
 			storage_guild_storagesave(sd->status.account_id, sd->status.guild_id,0);
+		stor->storage_status=0;
 	}
-	stor->storage_status=0;
 	sd->state.storage_flag = 0;
 
 	return 0;