summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2008-10-21 19:35:01 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2008-10-21 19:35:01 +0000
commitee68245b1ff2af84f749c14841462328db9ed432 (patch)
tree740b0897817cb286e66f78b194e3da9641fc9ccc
parentfcafa58b344a9c47a8e67227fcffe7690953c648 (diff)
downloadmanaserv-ee68245b1ff2af84f749c14841462328db9ed432.tar.gz
manaserv-ee68245b1ff2af84f749c14841462328db9ed432.tar.bz2
manaserv-ee68245b1ff2af84f749c14841462328db9ed432.tar.xz
manaserv-ee68245b1ff2af84f749c14841462328db9ed432.zip
Fixed some compile warnings.
-rw-r--r--ChangeLog113
-rw-r--r--src/account-server/account.cpp4
-rw-r--r--src/chat-server/post.cpp2
-rw-r--r--src/defines.h2
-rw-r--r--src/game-server/resourcemanager.cpp3
5 files changed, 71 insertions, 53 deletions
diff --git a/ChangeLog b/ChangeLog
index b13dae72..9a518726 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,21 +1,28 @@
+2008-10-21 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/account-server/account.cpp, src/chat-server/post.cpp,
+ src/defines.h, src/game-server/resourcemanager.cpp: Fixed some compile
+ warnings.
+
2008-10-21 Dennis Friis <peavey@placid.dk>
+
* src/dal/sqlitedataprovider.h, src/game-server/being.hpp: Add
limits.h where needed.
2008-10-21 David Athay <ko2fan@gmail.com>
- * src/account-server/serverhandler.cpp,
+ * src/account-server/serverhandler.cpp,
src/account-server/dalstorage.cpp, src/account-server/dalstorage.hpp,
src/account-server/dalstoragesql.hpp, src/defines.h,
- src/game-server/accountconnection.cpp, src/game-server/main-game.cpp: The
- game server now tries to connect to the account server when disconnected.
- Fixed some of the postal system.
+ src/game-server/accountconnection.cpp, src/game-server/main-game.cpp:
+ The game server now tries to connect to the account server when
+ disconnected. Fixed some of the postal system.
2008-10-17 Andreas Habel <mail@exceptionfault.de>
- * src/sql/sqlite/createTables.sql, src/sql/mysql/createTables.sql: added
- table definitions for item auctions
-
+ * src/sql/sqlite/createTables.sql, src/sql/mysql/createTables.sql:
+ Added table definitions for item auctions.
+
2008-10-15 David Athay <ko2fan@gmail.com>
* src/chat-server/chathandler.cpp, src/defines.h,
@@ -25,8 +32,8 @@
2008-10-13 Andreas Habel <mail@exceptionfault.de>
- * src/account-server/dalstorage.cpp: fixed bug 456: erroneous sql query
- at character save
+ * src/account-server/dalstorage.cpp: fixed bug 456: erroneous sql
+ query at character save
2008-09-27 Philipp Sehmisch <tmw@crushnet.org>
@@ -36,19 +43,21 @@
src/game-server/item.cpp, src/game-server/item.hpp,
src/game-server/itemmanager.cpp, src/game-server/monster.cpp,
src/game-server/monster.hpp, src/game-server/monstermanager.cpp,
- gameserver.cbp, src/Makefile.AM: Implemented getting the attack zone of
- weapons from the item database and implemented single target attacks
- useful for projectile weapons like bows.
+ gameserver.cbp, src/Makefile.AM: Implemented getting the attack zone
+ of weapons from the item database and implemented single target
+ attacks useful for projectile weapons like bows.
2008-09-19 David Athay <ko2fan@gmail.com>
* accountserver.cbp, src/account-server/main-account.cpp,
src/account-server/serverhandler.cpp, src/chat-server/post.cpp,
src/chat-server/post.hpp, src/defines.h,
- src/game-server/gamehandler.cpp, src/game-server/accountconnection.cpp,
- src/game-server/gamehandler.hpp, src/game-server/accountconnection.hpp,
- src/game-server/postman.hpp, src/game-server/main-game.cpp,
- gameserver.cbp: Added post communication between chat and game servers.
+ src/game-server/gamehandler.cpp,
+ src/game-server/accountconnection.cpp,
+ src/game-server/gamehandler.hpp,
+ src/game-server/accountconnection.hpp, src/game-server/postman.hpp,
+ src/game-server/main-game.cpp, gameserver.cbp: Added post
+ communication between chat and game servers,
2008-09-19 Andreas Habel <mail@exceptionfault.de>
@@ -57,8 +66,8 @@
* src/account-server/dalstorage.cpp, src/account-server/dalstorage.hpp,
src/account-server/dalstoragesql.hpp, src/sql/mysql/createTables.sql,
src/sql/sqlite/createTables.sql, src/sql/sqlite/tmw.db: Added table
- tmw_char_skills to store skills of a character. Removed weapon skills from
- table tmw_characters.
+ tmw_char_skills to store skills of a character. Removed weapon skills
+ from table tmw_characters.
2008-09-18 David Athay <ko2fan@gmail.com>
@@ -71,40 +80,45 @@
* src/sql/*, src/account-server/dalstoragesql.hpp: added installation
scripts to set up database schemas for mysql, sqlite and postgresql.
- The create table statements have been completely removed out from the c++
- source into separate, provider specific sql files.
+ The create table statements have been completely removed out from the
+ c++ source into separate, provider specific sql files.
* docs/tmwserv.xml: added database specific parameters to configure
each provider, that is used as database backend independent
- * Doxyfile: doxygen now also includes non-documented functions and provides
- a dictionary for all classes
- * dal/dataprovider.h, dal/sqlitedataprovider.h, dal/mysqldataprovider.h,
- dal/mysqldataprovider.cpp, dal/sqlitedataprovider.cpp:
- Extended abstract dataprovider to support transactions, implemented for
- SQLite and mySQL. Added methods to retrieve last inserted
- auto-increment value and the number of modified rows in the last statement.
+ * Doxyfile: doxygen now also includes non-documented functions and
+ provides a dictionary for all classes.
+ * dal/dataprovider.h, dal/sqlitedataprovider.h,
+ dal/mysqldataprovider.h, dal/mysqldataprovider.cpp,
+ dal/sqlitedataprovider.cpp: Extended abstract dataprovider to support
+ transactions, implemented for SQLite and mySQL. Added methods to
+ retrieve last inserted auto-increment value and the number of modified
+ rows in the last statement.
* account-server/dalstorage.cpp: Tiny rewrite to be a little more
- transactional and use advanced database functionality. Fixed a bug when
- deleting a character that left data in quests table and guilds table.
- Simplified the connect routine of DALStorage class since every dataprovider
- is now responsible to retrieve its parameters for itself.
+ transactional and use advanced database functionality. Fixed a bug
+ when deleting a character that left data in quests table and guilds
+ table. Simplified the connect routine of DALStorage class since every
+ dataprovider is now responsible to retrieve its parameters for itself.
2008-09-15 Andreas Habel <mail@exceptionfault.de>
- * Doxyfile: added doxygen file, docu will be generated under docs/api/html
- * src/account-server/dalstorage.cpp, src/account-server/dalstorage.hpp,
- src/account-server/dalstoragesql.hpp, src/account-server/main-account.cpp:
- added table tmw_world_states to store map and world-specific variables,
- extended DALStorage to set and get those new variables, applied Kess's diff
- file from mantis #424 with modifications for PostgreSQL support.
+ * Doxyfile: added doxygen file, docu will be generated under
+ docs/api/html.
+ * src/account-server/dalstorage.cpp,
+ src/account-server/dalstorage.hpp,
+ src/account-server/dalstoragesql.hpp,
+ src/account-server/main-account.cpp: Added table tmw_world_states to
+ store map and world-specific variables, extended DALStorage to set and
+ get those new variables, applied Kess's diff file from mantis #424
+ with modifications for PostgreSQL support.
2008-09-10 Andreas Habel <mail@exceptionfault.de>
* src/account-server/dalstorage.cpp, src/account-server/account.cpp,
src/account-server/account.hpp, src/account-server/accounthandler.cpp,
- src/account-server/dalstorage.hpp, src/account-server/dalstoragesql.hpp:
- Extended tmw_accounts table with columns for lastlogin and registration
- date. Modified account-server to fill the new columns on registration and
- login. Recreation of database needed!
+ src/account-server/dalstorage.hpp,
+ src/account-server/dalstoragesql.hpp: Extended tmw_accounts table with
+ columns for lastlogin and registration date. Modified account-server
+ to fill the new columns on registration and login. Recreation of
+ database needed!
* src/account-server/dalstorage.cpp,
src/account-server/dalstoragesql.hpp: Added createIndex function to
create indexes on tables.
@@ -116,8 +130,9 @@
* src/account-server/main-account.cpp,
src/account-server/dalstorage.cpp, src/account-server/dalstorage.hpp:
Added checking for expired bans.
- * src/account-server/dalstorage.cpp, src/account-server/dalstorage.hpp:
- ExceptionFault corrected my poor sql skills.
+ * src/account-server/dalstorage.cpp,
+ src/account-server/dalstorage.hpp: ExceptionFault corrected my poor
+ sql skills.
2008-08-18 Roderic Morris <roderic@ccs.neu.edu>
@@ -127,11 +142,13 @@
* src/account-server/dalstorage.cpp, src/chat-server/guild.hpp,
src/chat-server/chathandler.cpp: Misc fixes of guild.
- * src/account-server/dalstorage.cpp, src/account-server/dalstorage.hpp,
- src/account-server/dalstoragesql.hpp, src/chat-server/guildmanager.cpp,
- src/chat-server/chatclient.hpp, src/chat-server/guild.cpp,
- src/chat-server/guildmanager.hpp, src/chat-server/guild.hpp,
- src/chat-server/chathandler.cpp: Changed guilds to use character id.
+ * src/account-server/dalstorage.cpp,
+ src/account-server/dalstorage.hpp,
+ src/account-server/dalstoragesql.hpp,
+ src/chat-server/guildmanager.cpp, src/chat-server/chatclient.hpp,
+ src/chat-server/guild.cpp, src/chat-server/guildmanager.hpp,
+ src/chat-server/guild.hpp, src/chat-server/chathandler.cpp: Changed
+ guilds to use character id.
2008-08-13 Yohann Ferreira <bertram@cegetel.net>
diff --git a/src/account-server/account.cpp b/src/account-server/account.cpp
index 289ad8b5..e2c67cad 100644
--- a/src/account-server/account.cpp
+++ b/src/account-server/account.cpp
@@ -69,9 +69,9 @@ void Account::setID(int id)
void Account::setRegistrationDate(time_t time)
{
mRegistrationDate = time;
-};
+}
void Account::setLastLogin(time_t time)
{
mLastLogin = time;
-};
+}
diff --git a/src/chat-server/post.cpp b/src/chat-server/post.cpp
index 6fc06e2a..2d3c12e3 100644
--- a/src/chat-server/post.cpp
+++ b/src/chat-server/post.cpp
@@ -116,7 +116,7 @@ bool Post::addLetter(Letter *letter)
Letter* Post::getLetter(int letter) const
{
- if (letter < 0 || letter > mLetters.size())
+ if (letter < 0 || (size_t) letter > mLetters.size())
{
return NULL;
}
diff --git a/src/defines.h b/src/defines.h
index 3f73b1dd..8c453001 100644
--- a/src/defines.h
+++ b/src/defines.h
@@ -284,7 +284,7 @@ enum {
ERRMSG_ALREADY_TAKEN, // name used was already taken
ERRMSG_SERVER_FULL, // the server is overloaded
ERRMSG_TIME_OUT, // data failed to arrive in due time
- ERRMSG_TOO_MANY_ATTACHMENTS, // too many attachments in letter
+ ERRMSG_TOO_MANY_ATTACHMENTS // too many attachments in letter
};
// Login specific return values
diff --git a/src/game-server/resourcemanager.cpp b/src/game-server/resourcemanager.cpp
index 8816e8c0..562b20a8 100644
--- a/src/game-server/resourcemanager.cpp
+++ b/src/game-server/resourcemanager.cpp
@@ -79,7 +79,8 @@ void ResourceManager::initialize()
#else
// Retrieve the current path
char programPath[256];
- getcwd(programPath, 256);
+ if (!getcwd(programPath, 256))
+ strcpy(programPath, ".");
strncat(programPath, "/data", 256 - strlen(programPath) - 1);
// Create our directory structure