Author: shadowmaster
Date: Sun Aug 24 00:20:39 2008
New Revision: 28908
URL: http://svn.gna.org/viewcvs/wesnoth?rev=28908&view=rev
Log:
* Sanitized many messages written in awkward English.
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=28908&r1=28907&r2=28908&view=diff
==============================================================================
--- trunk/src/campaign_server/campaign_server.cpp (original)
+++ trunk/src/campaign_server/campaign_server.cpp Sun Aug 24 00:20:39 2008
@@ -46,6 +46,8 @@
#endif
#define LOG_CS lg::err(lg::network, false)
+
+#define DEFAULT_CAMPAIGND_PORT 15003
namespace {
@@ -104,13 +106,13 @@
if(script == "") return;
#if (defined(_WIN32))
- LOG_CS << "ERROR: Tried to execute a script on a not supporting
platform\n";
+ LOG_CS << "ERROR: Tried to execute a script on an unsupported
platform\n";
return;
#else
pid_t childpid;
if((childpid = fork()) == -1) {
- LOG_CS << "ERROR fork failed while updating campaign "
<< addon << "\n";
+ LOG_CS << "ERROR: fork failed while updating campaign "
<< addon << "\n";
return;
}
@@ -121,9 +123,9 @@
// output which will make the logging look ugly.
execlp(script.c_str(), script.c_str(), addon.c_str(),
(char *)NULL);
- // exec() and family never return if they do we have a
problem
- std::cerr << "ERROR exec failed for addon " << addon
- << " with errno = " << errno << "\n";
+ // exec() and family never return; if they do, we have
a problem
+ std::cerr << "ERROR: exec failed with errno " << errno
<< " for addon " << addon
+ << '\n';
exit(errno);
} else {
@@ -143,7 +145,7 @@
/** Seems like compression level above 6 is waste of cpu cycle
*/
compress_level_ =
lexical_cast_default<int>(cfg_["compress_level"],6);
cfg_["compress_level"] =
lexical_cast<std::string>(compress_level_);
- return lexical_cast_default<int>(cfg_["port"], 15003);
+ return lexical_cast_default<int>(cfg_["port"],
DEFAULT_CAMPAIGND_PORT);
}
campaign_server::campaign_server(const std::string& cfgfile,
@@ -280,7 +282,7 @@
config data;
if (binary_stream->peek() == 31) //This is gzip
file allready
{
- LOG_CS << "All ready converted\n";
+ LOG_CS << "Already converted\n";
continue;
}
read_compressed(data, *binary_stream);
@@ -458,13 +460,13 @@
config* data =
upload->child("data");
config* campaign =
campaigns().find_child("campaign","name",(*upload)["name"]);
if(data == NULL) {
- LOG_CS << "Upload
aborted no data.\n";
+ LOG_CS << "Upload
aborted - no add-on data.\n";
network::send_data(construct_error("No add-on data was supplied."), sock,
gzipped);
} else
if(addon_name_legal((*upload)["name"]) == false) {
- LOG_CS << "Upload
aborted invalid name.\n";
+ LOG_CS << "Upload
aborted - invalid add-on name.\n";
network::send_data(construct_error("The name of the add-on is invalid"), sock,
gzipped);
} else
if(check_names_legal(*data) == false) {
- LOG_CS << "Upload
aborted invalid file name.\n";
+ LOG_CS << "Upload
aborted - invalid file names in add-on data.\n";
network::send_data(construct_error("The add-on contains an illegal file or
directory name."), sock, gzipped);
} else if(campaign != NULL &&
(*campaign)["passphrase"] != (*upload)["passphrase"]) {
// the user password
failed, now test for the master password, in master password
@@ -505,7 +507,7 @@
network::send_data(construct_message(message), sock, gzipped);
} else {
- LOG_CS <<
"Upload aborted invalid passphrase.\n";
+ LOG_CS <<
"Upload aborted - incorrect passphrase.\n";
network::send_data(construct_error("The add-on already exists, and your
passphrase was incorrect."), sock, gzipped);
}
} else {
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits