Moodle

Mnet : add item transport for test client

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.8, 1.8.1
  • Fix Version/s: 1.8.4, 1.9, 2.0
  • Component/s: MNet
  • Labels:
    None
  • Affected Branches:
    MOODLE_18_STABLE
  • Fixed Branches:
    MOODLE_18_STABLE, MOODLE_19_STABLE, MOODLE_20_STABLE

Description

In testclient.php, get error message :
"No transport method is approved for this host in your DB table. Please enable a transport method and try again".

Because item "transport" (and "portno") is not processed in peer.php

Here is a fix:

Adding item "transport" (and "portno") everywhere they should be set or processed (peer.php and environment.php). After item "last_log_id".

Index: peer.php
===================================================================
RCS file: /cvsroot/moodle/moodle/mnet/peer.php,v
retrieving revision 1.5.2.1
diff -u -r1.5.2.1 peer.php
— peer.php 2 Apr 2007 01:45:37 -0000 1.5.2.1
+++ peer.php 19 Jun 2007 08:06:10 -0000
@@ -18,6 +18,8 @@
var $public_key_expires = 0;
var $last_connect_time = 0;
var $last_log_id = 0;
+ var $transport = '';
+ var $portno = '';
var $keypair = array();
var $error = array();

@@ -155,6 +157,8 @@
$obj->deleted = $this->deleted;
$obj->last_connect_time = $this->last_connect_time;
$obj->last_log_id = $this->last_log_id;
+ $obj->transport = $this->transport;
+ $obj->portno = $this->portno;

if (isset($this->id) && $this->id > 0) { $obj->id = $this->id; @@ -231,6 +235,8 @@ $this->public_key_expires = $hostinfo->public_key_expires; $this->last_connect_time = $hostinfo->last_connect_time; $this->last_log_id = $hostinfo->last_log_id; + $this->transport = $hostinfo->transport; + $this->portno = $hostinfo->portno; }

function get_public_key() {
Index: environment.php
===================================================================
RCS file: /cvsroot/moodle/moodle/mnet/environment.php,v
retrieving revision 1.8.2.1
diff -u -r1.8.2.1 environment.php
— environment.php 26 Mar 2007 22:51:42 -0000 1.8.2.1
+++ environment.php 19 Jun 2007 08:06:10 -0000
@@ -14,6 +14,8 @@
var $public_key_expires = 0;
var $last_connect_time = 0;
var $last_log_id = 0;
+ var $transport = '';
+ var $portno = '';
var $keypair = array();
var $deleted = 0;

@@ -76,6 +78,8 @@
$hostobject->public_key_expires = '';
$hostobject->last_connect_time = '0';
$hostobject->last_log_id = '0';
+ $hostobject->transport = '';
+ $hostobject->portno = '';
$hostobject->deleted = 0;
$hostobject->name = 'All Hosts';

Activity

Hide
Donal McMullan added a comment -

Hi Arnaud - the old testclient.php was really buggy - I hadn't kept it up to date with the API. The "Transport" concept was removed some time ago.

I thought testclient.php maybe wasn't very useful, so I rewrote it as a remote-service browser. There's not much of the old code in there anymore.

Now you can click on a host and drill down into the services and methods that it is publishing to your host. You can see the method profiles and descriptions (taken from the methods' docblocks).

I hope you consider this an improvement!

Show
Donal McMullan added a comment - Hi Arnaud - the old testclient.php was really buggy - I hadn't kept it up to date with the API. The "Transport" concept was removed some time ago. I thought testclient.php maybe wasn't very useful, so I rewrote it as a remote-service browser. There's not much of the old code in there anymore. Now you can click on a host and drill down into the services and methods that it is publishing to your host. You can see the method profiles and descriptions (taken from the methods' docblocks). I hope you consider this an improvement!

People

Vote (0)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: