mail[Wesnoth-commits] r27097 - /trunk/src/campaign_server/campaign_server.cpp


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

Header


Content

Posted by paniemin on June 11, 2008 - 13:09:
Author: suokko
Date: Wed Jun 11 10:14:34 2008
New Revision: 27097

URL: http://svn.gna.org/viewcvs/wesnoth?rev=27097&view=rev
Log:
Made campaignd to tell if connection is using gzipp

Modified:
    trunk/src/campaign_server/campaign_server.cpp

Modified: trunk/src/campaign_server/campaign_server.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/campaign_server/campaign_server.cpp?rev=27097&r1=27096&r2=27097&view=diff
==============================================================================
--- trunk/src/campaign_server/campaign_server.cpp (original)
+++ trunk/src/campaign_server/campaign_server.cpp Wed Jun 11 10:14:34 2008
@@ -315,7 +315,7 @@
                                config data;
                                while((sock = network::receive_data(data, 0, 
&gzipped)) != network::null_connection) {
                                        if(const config* req = 
data.child("request_campaign_list")) {
-                                               LOG_CS << "sending campaign 
list to " << network::ip_address(sock) << "\n";
+                                               LOG_CS << "sending campaign 
list to " << network::ip_address(sock) << (gzipped?" using gzip":"") << "\n";
                                                time_t epoch = time(NULL);
                                                config campaign_list;
                                                (campaign_list)["timestamp"] 
= lexical_cast<std::string>(epoch);
@@ -372,7 +372,7 @@
                                                
response.add_child("campaigns",campaign_list);
                                                network::send_data(response, 
sock, gzipped);
                                        } else if(const config* req = 
data.child("request_campaign")) {
-                                               LOG_CS << "sending campaign 
'" << (*req)["name"] << "' to " << network::ip_address(sock) << "\n";
+                                               LOG_CS << "sending campaign 
'" << (*req)["name"] << "' to " << network::ip_address(sock)  << (gzipped?" 
using gzip":"") << "\n";
                                                config* const campaign = 
campaigns().find_child("campaign","name",(*req)["name"]);
                                                if(campaign == NULL) {
                                                        
network::send_data(construct_error("Add-on '" + (*req)["name"] + "'not 
found."), sock, gzipped);




Related Messages


Powered by MHonArc, Updated Wed Jun 11 14:41:21 2008