- Timestamp:
- Nov 11, 2014, 1:05:14 AM (10 years ago)
- Branches:
- master
- Children:
- 48801af
- Parents:
- a9a1295
- Location:
- server
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
server/DataAccess.cpp
ra9a1295 rc941e07 31 31 32 32 mysql_init(&mysql); 33 connection = mysql_real_connect(&mysql, "localhost", "pythonAdmin", "pyMaster09*", "pythondb", 0, 0, 0);33 connection = mysql_real_connect(&mysql, "localhost", username.c_str(), password.c_str(), database.c_str(), 0, 0, 0); 34 34 35 35 if (connection == NULL) { -
server/server.cpp
ra9a1295 rc941e07 43 43 // from used to be const. Removed that so I could take a reference 44 44 // and use it to send messages 45 void processMessage(const NETWORK_MSG& clientMsg, struct sockaddr_in& from, MessageProcessor& msgProcessor, map<unsigned int, Player*>& mapPlayers, map<string, Game*>& mapGames, ofstream& outputLog);45 void processMessage(const NETWORK_MSG& clientMsg, struct sockaddr_in& from, MessageProcessor& msgProcessor, map<unsigned int, Player*>& mapPlayers, map<string, Game*>& mapGames, DataAccess& da, ofstream& outputLog); 46 46 47 47 Player *findPlayerByName(map<unsigned int, Player*> &m, string name); … … 256 256 if (msgProcessor.receiveMessage(&clientMsg, &from) >= 0) 257 257 { 258 processMessage(clientMsg, from, msgProcessor, mapPlayers, mapGames, outputLog);258 processMessage(clientMsg, from, msgProcessor, mapPlayers, mapGames, da, outputLog); 259 259 260 260 cout << "Finished processing the message" << endl; … … 281 281 } 282 282 283 void processMessage(const NETWORK_MSG &clientMsg, struct sockaddr_in &from, MessageProcessor &msgProcessor, map<unsigned int, Player*>& mapPlayers, map<string, Game*>& mapGames, ofstream& outputLog)283 void processMessage(const NETWORK_MSG &clientMsg, struct sockaddr_in &from, MessageProcessor &msgProcessor, map<unsigned int, Player*>& mapPlayers, map<string, Game*>& mapGames, DataAccess& da, ofstream& outputLog) 284 284 { 285 285 NETWORK_MSG serverMsg; 286 DataAccess da;287 286 288 287 cout << "Inside processMessage" << endl;
Note:
See TracChangeset
for help on using the changeset viewer.