mail[Wesnoth-commits] r25347 - /branches/1.4/src/server/server.cpp


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

Header


Content

Posted by martinxyz on March 30, 2008 - 23:03:
Author: martinxyz
Date: Sun Mar 30 23:03:54 2008
New Revision: 25347

URL: http://svn.gna.org/viewcvs/wesnoth?rev=25347&view=rev
Log:
backporting r25346 (do not send the full gamelist when not neccessary)

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

Modified: branches/1.4/src/server/server.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/branches/1.4/src/server/server.cpp?rev=25347&r1=25346&r2=25347&view=diff
==============================================================================
--- branches/1.4/src/server/server.cpp (original)
+++ branches/1.4/src/server/server.cpp Sun Mar 30 23:03:54 2008
@@ -1424,7 +1424,7 @@
                const simple_wml::node& change = 
*data.child("change_controller");
                g->transfer_side_control(sock, change);
                if (g->describe_slots()) {
-                       send_gamelist_diff();
+                       update_game_in_lobby(g);
                }
                // FIXME: Why not save it in the history_? (if successful)
                return;
@@ -1449,7 +1449,7 @@
                if (user) {
                        lobby_.add_player(user, true);
                        if (g->describe_slots()) {
-                               send_gamelist_diff(user);
+                               update_game_in_lobby(g, user);
                        }
                        // Send the removed user the lobby game list.
                        send_doc(games_and_users_list_, user);
@@ -1541,16 +1541,6 @@
 
        delete *game_it;
        games_.erase(game_it);
-}
-
-void server::send_gamelist_diff(network::connection exclude)
-{
-       //for nowe we send the full game and users list every time, and then
-       //send an empty diff to let the clients know they should do an update
-       lobby_.send_data(games_and_users_list_, exclude);
-
-       static simple_wml::document 
empty_gamelist_diff_doc("[gamelist_diff]\n[/gamelist_diff]\n", 
simple_wml::INIT_COMPRESSED);
-       lobby_.send_data(empty_gamelist_diff_doc, exclude);
 }
 
 void server::update_game_in_lobby(const game* g, network::connection exclude)




Related Messages


Powered by MHonArc, Updated Sun Mar 30 23:21:31 2008