mail[Wesnoth-commits] r33302 - in /branches/1.4: changelog src/server/server.cpp


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by soliton . de on March 03, 2009 - 10:38:
Author: soliton
Date: Tue Mar  3 10:38:03 2009
New Revision: 33302

URL: http://svn.gna.org/viewcvs/wesnoth?rev=33302&view=rev
Log:
send lobby diffs seperately; fixes bug #13099: MP lobby player list becomes 
inaccurate over time

Modified:
    branches/1.4/changelog
    branches/1.4/src/server/server.cpp

Modified: branches/1.4/changelog
URL: 
http://svn.gna.org/viewcvs/wesnoth/branches/1.4/changelog?rev=33302&r1=33301&r2=33302&view=diff
==============================================================================
--- branches/1.4/changelog (original)
+++ branches/1.4/changelog Tue Mar  3 10:38:03 2009
@@ -7,6 +7,7 @@
  * multiplayer:
    * server:
      * create the fifo group accessible (instead of only user accessible)
+     * fixed bug #13099: MP lobby player list becomes inaccurate over time
  * miscellaneous and bug fixes:
    * AmigaOS4: Minimum stack cookie to prevent stack overflow (patch #1107)
    * Additional screenmodes for when SDL can't guess them (patch #1108)

Modified: branches/1.4/src/server/server.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/branches/1.4/src/server/server.cpp?rev=33302&r1=33301&r2=33302&view=diff
==============================================================================
--- branches/1.4/src/server/server.cpp (original)
+++ branches/1.4/src/server/server.cpp Tue Mar  3 10:38:03 2009
@@ -1722,10 +1722,9 @@
 
        // Send a diff of the gamelist with the game deleted to players in 
the lobby
        simple_wml::document diff;
-       bool send_diff = false;
        if(make_delete_diff(*gamelist, "gamelist", "game",
                            (*game_it)->description(), diff)) {
-               send_diff = true;
+               lobby_.send_data(diff);
        }
 
        // Delete the game from the games_and_users_list_.
@@ -1748,17 +1747,15 @@
                const wesnothd::player_map::iterator pl = 
players_.find(*user);
                if (pl != players_.end()) {
                        pl->second.mark_available();
+                       simple_wml::document udiff;
                        if (make_change_diff(games_and_users_list_.root(), 
NULL,
-                                            "user", 
pl->second.config_address(), diff)) {
-                               send_diff = true;
+                                            "user", 
pl->second.config_address(), udiff)) {
+                               lobby_.send_data(udiff);
                        }
                } else {
                        ERR_SERVER << "ERROR: delete_game(): Could not find 
user in players_. (socket: "
                                << *user << ")\n";
                }
-       }
-       if (send_diff) {
-               lobby_.send_data(diff,0,"lobby_delete_g");
        }
 
        //send users in the game a notification to leave the game since it 
has ended




Related Messages


Powered by MHonArc, Updated Tue Mar 03 11:00:08 2009