From: donal72 Date: Wed, 24 Jan 2007 23:17:08 +0000 (+0000) Subject: Mnet: We haven't been updating the last_connect_time field. Let's do that. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=3e008de80479d062debbf4383942d0134cd451d6;p=moodle.git Mnet: We haven't been updating the last_connect_time field. Let's do that. --- diff --git a/mnet/peer.php b/mnet/peer.php index 4ee56545ae..2e1c64cc50 100644 --- a/mnet/peer.php +++ b/mnet/peer.php @@ -165,6 +165,11 @@ class mnet_peer { } } + function touch() { + $this->last_connect_time = time(); + $this->commit(); + } + function set_name($newname) { if (is_string($newname) && strlen($newname <= 80)) { $this->name = $newname; diff --git a/mnet/xmlrpc/client.php b/mnet/xmlrpc/client.php index f65a683fd2..e765762b02 100644 --- a/mnet/xmlrpc/client.php +++ b/mnet/xmlrpc/client.php @@ -196,6 +196,8 @@ class mnet_xmlrpc_client { return false; } + $mnet_peer->touch(); + $crypt_parser = new mnet_encxml_parser(); $crypt_parser->parse($this->rawresponse); diff --git a/mnet/xmlrpc/server.php b/mnet/xmlrpc/server.php index 9acc80fda6..2682ec8eb1 100644 --- a/mnet/xmlrpc/server.php +++ b/mnet/xmlrpc/server.php @@ -202,6 +202,7 @@ function mnet_server_strip_wrappers($HTTP_RAW_POST_DATA) { // Does the signature match the data and the public cert? $signature_verified = openssl_verify($payload, base64_decode($sig_parser->signature), $certificate); if ($signature_verified == 1) { + $MNET_REMOTE_CLIENT->touch(); // Parse the XML } elseif ($signature_verified == 0) { $currkey = mnet_get_public_key($MNET_REMOTE_CLIENT->wwwroot);