Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2009-01-10 16:08:02 +0000
committerStijn Buys <ingar@osirion.org>2009-01-10 16:08:02 +0000
commit67a73b90a4c0f91ddf9322cf0ecfc6c99016e384 (patch)
tree3f36be57d9c7c548172bd598b4d128c5efc2d565 /src/core/netconnection.cc
parentd0d4bd189e2654b61be7740edd15d96b6cab968d (diff)
ping issues
Diffstat (limited to 'src/core/netconnection.cc')
-rw-r--r--src/core/netconnection.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/netconnection.cc b/src/core/netconnection.cc
index 267ff8f..a3a2a43 100644
--- a/src/core/netconnection.cc
+++ b/src/core/netconnection.cc
@@ -401,10 +401,10 @@ void NetConnection::send_private_message(std::string const &text)
}
// send a ping reply
-void NetConnection::send_ping_reply()
+void NetConnection::send_ping_reply(unsigned long timestamp)
{
std::ostringstream msg;
- msg << "ping " << timestamp() << '\n';
+ msg << "ping " << timestamp << '\n';
this->send_raw(msg.str());
}
@@ -476,14 +476,14 @@ void NetConnection::parse_incoming_message(const std::string & message)
} else if (command == "ping") {
unsigned long timestamp;
if ((msgstream >> timestamp)) {
-
+ send_ping_reply(timestamp);
}
} else if (command == "frame") {
unsigned long timestamp;
if ((msgstream >> timestamp)) {
+ send_ping_reply(timestamp);
connection_timestamp = timestamp;
- send_ping_reply();
}
} else if (command == "die") {