Skip to Content.
Sympa Menu

ndt-dev - [ndt-dev] [ndt] r793 committed - commit patch for http://code.google.com/p/ndt/issues/detail?id=67

Subject: NDT-DEV email list created

List archive

[ndt-dev] [ndt] r793 committed - commit patch for http://code.google.com/p/ndt/issues/detail?id=67


Chronological Thread 
  • From:
  • To:
  • Subject: [ndt-dev] [ndt] r793 committed - commit patch for http://code.google.com/p/ndt/issues/detail?id=67
  • Date: Wed, 05 Dec 2012 23:10:03 +0000

Revision: 793
Author:

Date: Wed Dec 5 15:09:48 2012
Log: commit patch for http://code.google.com/p/ndt/issues/detail?id=67
http://code.google.com/p/ndt/source/detail?r=793

Modified:
/branches/android/Android/AndroidManifest.xml
/branches/android/Android/res/values/strings.xml
/branches/android/Android/src/net/measurementlab/ndt/ResultsActivity.java
/branches/android/Android/src/net/measurementlab/ndt/SelectServerActivity.java
/branches/android/Android/src/net/measurementlab/ndt/TestsActivity.java
/branches/android/java/net/measurementlab/ndt/NdtTests.java

=======================================
--- /branches/android/Android/AndroidManifest.xml Fri Dec 16 08:21:29
2011
+++ /branches/android/Android/AndroidManifest.xml Wed Dec 5 15:09:48
2012
@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android";
- package="net.measurementlab.ndt" android:versionCode="2"
- android:versionName="1.0b2">
+ package="net.measurementlab.ndt" android:versionCode="3"
+ android:versionName="1.0b3">
<application android:icon="@drawable/ndt" android:label="@string/app_name" android:theme="@style/NdtTheme">
- <activity android:name=".InitialActivity" android:label="@string/app_name" android:theme="@style/NdtTheme.Blue">
+ <activity android:name=".InitialActivity" android:screenOrientation="portrait" android:label="@string/app_name" android:theme="@style/NdtTheme.Blue">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name=".TestsActivity" android:label="@string/app_name" android:theme="@style/NdtTheme" />
- <activity android:name=".ResultsActivity" android:label="@string/app_name" android:theme="@style/NdtTheme.Blue" />
- <activity android:name=".SelectServerActivity" android:label="@string/app_name" />
+ <activity android:name=".TestsActivity" android:screenOrientation="portrait" android:label="@string/app_name" android:theme="@style/NdtTheme" />
+ <activity android:name=".ResultsActivity" android:screenOrientation="portrait" android:label="@string/app_name" android:theme="@style/NdtTheme.Blue" />
+ <activity android:name=".SelectServerActivity" android:screenOrientation="portrait" android:label="@string/app_name" />
<service android:name=".NdtService" />
</application>
<uses-sdk android:minSdkVersion="8" />
=======================================
--- /branches/android/Android/res/values/strings.xml Thu Dec 15 07:59:31 2011
+++ /branches/android/Android/res/values/strings.xml Wed Dec 5 15:09:48 2012
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
- <string name="app_name">NDT Mobile Client (beta 2)</string>
+ <string name="app_name">NDT Mobile Client (beta 3)</string>
<string name="about">About</string>
<string name="start">Start</string>
<string name="label_about_description">This software is based in part on NDT: Copyright (c) 2003 University of Chicago.</string>
=======================================
--- /branches/android/Android/src/net/measurementlab/ndt/ResultsActivity.java Thu Dec 15 08:06:20 2011
+++ /branches/android/Android/src/net/measurementlab/ndt/ResultsActivity.java Wed Dec 5 15:09:48 2012
@@ -72,14 +72,18 @@
protected void onResume() {
super.onResume();
Intent intent = getIntent();
- Map<String, Object> variables = (Map<String, Object>) intent
+ if ( intent != null ) {
+ Map<String, Object> variables = (Map<String, Object>)
intent
.getSerializableExtra(NdtService.EXTRA_VARS);
- formatSummaryResults(variables);
- formatDetailedResults(variables);
- String diagnosticStatus = intent
- .getStringExtra(NdtService.EXTRA_DIAG_STATUS);
- formatAdvancedResults(diagnosticStatus);
-
+ if ( variables.containsKey(new String("pub_isReady"))
&&
+ variables.get("pub_isReady").equals("yes") ) {
+ formatSummaryResults(variables);
+ formatDetailedResults(variables);
+ String diagnosticStatus = intent
+
.getStringExtra(NdtService.EXTRA_DIAG_STATUS);
+ formatAdvancedResults(diagnosticStatus);
+ }
+ }
Toast resultsHint = Toast.makeText(getApplicationContext(),
getString(R.string.results_swipe_hint), 10);
resultsHint.show();
@@ -120,7 +124,7 @@
Double uploadSpeed = (Double) variables.get("pub_c2sspd");
TextView textView = (TextView) findViewById(R.id.UploadSpeed);
textView.setText(format.format(uploadSpeed));
-
+
Double downloadSpeed = (Double) variables.get("pub_s2cspd");
textView = (TextView) findViewById(R.id.DownloadSpeed);
textView.setText(format.format(downloadSpeed));
@@ -197,11 +201,11 @@
results.append('\n');

results.append(formatDetailedLine(R.string.results_detailed_cwndtime, variables,
- "pub_cwndtime"));
+ "pub_pctcwndtime"));
results.append(formatDetailedLine(R.string.results_detailed_rcvr_limiting, variables,
"pub_pctRcvrLimited"));
variables.put("pub_OptimalRcvrBuffer", ((Integer) variables
- .get("pub_MaxRwinRcvd") * 1024));
+ .get("pub_MaxRwinRcvd") )); // NB: value is
in octets
results.append(formatDetailedLine(R.string.results_detailed_optimal_rcvr_buffer,
variables, "pub_OptimalRcvrBuffer"));
// TODO re-enable when link detection is more reliable
=======================================
--- /branches/android/Android/src/net/measurementlab/ndt/SelectServerActivity.java Thu Dec 15 08:12:46 2011
+++ /branches/android/Android/src/net/measurementlab/ndt/SelectServerActivity.java Wed Dec 5 15:09:48 2012
@@ -26,22 +26,35 @@

static final String SERVER_LIST[][] = {
{"Closest Server (DONAR)", "ndt.iupui.donar.measurement-lab.org"},
- {"Amsterdam, The Netherlands",
"ndt.iupui.ams.donar.measurement-lab.org"},
+ {"Auckland, New Zealand", "ndt.iupui.akl.donar.measurement-lab.org"},
+ {"Amsterdam, Netherlands", "ndt.iupui.ams.donar.measurement-lab.org"},
+ {"Stockholm, Sweden", "ndt.iupui.arn.donar.measurement-lab.org"},
{"Athens, Greece", "ndt.iupui.ath.donar.measurement-lab.org"},
{"Atlanta, Georgia", "ndt.iupui.atl.donar.measurement-lab.org"},
{"Chicago, Illinois", "ndt.iupui.ord.donar.measurement-lab.org"},
{"Dallas, Texas", "ndt.iupui.dfw.donar.measurement-lab.org"},
- {"Dulles, Virginia", "ndt.iupui.iad.donar.measurement-lab.org"},
+ {"Dublin, Ireland", "ndt.iupui.dub.donar.measurement-lab.org"},
+ {"Washington Dulles Intl Washington, DC", "ndt.iupui.iad.donar.measurement-lab.org"},
+ {"Hamburg, Germany", "ndt.iupui.ham.donar.measurement-lab.org"},
+ {"Tokyo, Japan", "ndt.iupui.hnd.donar.measurement-lab.org"},
{"Los Angeles, California",
"ndt.iupui.lax.donar.measurement-lab.org"},
+ {"Leeds, United Kingdom", "ndt.iupui.lba.donar.measurement-lab.org"},
{"London, United Kingdom", "ndt.iupui.lhr.donar.measurement-lab.org"},
- {"Miami, Florida", "ndt.iupui.mia.donar.measurement-lab.org"},
{"New York City, New York",
"ndt.iupui.lga.donar.measurement-lab.org"},
+ {"Ljubljana, Slovenia", "ndt.iupui.lju.donar.measurement-lab.org"},
+ {"Madrid, Spain", "ndt.iupui.mad.donar.measurement-lab.org"},
+ {"Miami, Florida", "ndt.iupui.mia.donar.measurement-lab.org"},
+ {"Milan, Italy", "ndt.iupui.mil.donar.measurement-lab.org"},
{"Mountain View, California",
"ndt.iupui.nuq.donar.measurement-lab.org"},
{"Paris, France", "ndt.iupui.par.donar.measurement-lab.org"},
{"Seattle, Washington", "ndt.iupui.sea.donar.measurement-lab.org"},
{"Sydney, Australia", "ndt.iupui.syd.donar.measurement-lab.org"},
- {"Tokyo, Japan", "ndt.iupui.hnd.donar.measurement-lab.org"},
+ {"Stavanger, Norway", "ndt.iupui.svg.donar.measurement-lab.org"},
+ {"Taipei, Taiwan", "ndt.iupui.tpe.donar.measurement-lab.org"},
+ {"Turin, Italy", "ndt.iupui.trn.donar.measurement-lab.org"},
+ {"Vienna, Austria", "ndt.iupui.vie.donar.measurement-lab.org"},
{"Wellington, New Zealand", "ndt.iupui.wlg.donar.measurement-lab.org"}
+
};

/**
=======================================
--- /branches/android/Android/src/net/measurementlab/ndt/TestsActivity.java Thu Dec 15 08:12:46 2011
+++ /branches/android/Android/src/net/measurementlab/ndt/TestsActivity.java Wed Dec 5 15:09:48 2012
@@ -26,6 +26,7 @@
*/
public class TestsActivity extends Activity {
private BroadcastReceiver statusReceiver;
+ private String serverHost=null;

/**
* Initializes the activity.
@@ -61,6 +62,9 @@
protected void onResume() {
super.onResume();

+ serverHost =
getIntent().getStringExtra(NdtService.EXTRA_SERVER_HOST);
+ Log.d(NdtSupport.LOG_TAG, "serverhost in TestsActivity: " +
serverHost);
+
preparing();

statusReceiver = createReceiver();
@@ -218,7 +222,13 @@

private String getServerAddress() {
try {
- InetAddress server = InetAddress.getByName(SelectServerActivity.SERVER_LIST[SelectServerActivity.DEFAULT_SERVER][1]);
+ InetAddress server = null;
+ if ( serverHost != null ) {
+ server = InetAddress.getByName(serverHost);
+ } else {
+ // use default
+ server = InetAddress.getByName(SelectServerActivity.SERVER_LIST[SelectServerActivity.DEFAULT_SERVER][1]);
+ }
return server.getHostAddress();
} catch (UnknownHostException e) {
Log.e(NdtSupport.LOG_TAG, "Error resolving server
hosts.", e);
=======================================
--- /branches/android/java/net/measurementlab/ndt/NdtTests.java Tue Oct 11 10:32:07 2011
+++ /branches/android/java/net/measurementlab/ndt/NdtTests.java Wed Dec 5 15:09:48 2012
@@ -264,6 +264,25 @@
}
}
}
+
+ public static String hexStrToDecimalStr(String str) {
+ if ( isNumericHex(str) ) {
+ return Integer.valueOf(str, 16).toString();
+ } else {
+ // Errors are placed in context so they are obviously
incorrect.
+ return "'"+str+"'";
+ }
+ }
+
+ public static boolean isNumericHex(String str) {
+ // Test whether the string is a valid hex string by a try/catch
+ try {
+ int i = Integer.parseInt(str, 16);
+ } catch(NumberFormatException nfe) {
+ return false;
+ }
+ return true;
+ }

public boolean test_mid(Protocol ctl) throws IOException
{
@@ -279,13 +298,13 @@
emailText = messages.getString("checkingMiddleboxes") + " ";

if (ctl.recv_msg(msg) != 0) {
- errmsg = messages.getString("protocolError") + Integer.parseInt(new String(msg.body), 16) + " instead\n";
+ errmsg = messages.getString("protocolError") + hexStrToDecimalStr(new String(msg.body)) + " instead\n";
return true;
}
if (msg.type != TEST_PREPARE) {
errmsg = messages.getString("mboxWrongMessage") + "\n";
if (msg.type == MSG_ERROR) {
- errmsg += "ERROR MSG: " + Integer.parseInt(new String(msg.body), 16) + "\n";
+ errmsg += "ERROR MSG: " + hexStrToDecimalStr(new String(msg.body)) + "\n";
}
return true;
}
@@ -329,13 +348,13 @@
s2cspd = ((8.0 * bytes) / 1000) / t;

if (ctl.recv_msg(msg) != 0) {
- errmsg = messages.getString("protocolError") + Integer.parseInt(new String(msg.body), 16) + " instead\n";
+ errmsg = messages.getString("protocolError") + hexStrToDecimalStr(new String(msg.body)) + " instead\n";
return true;
}
if (msg.type != TEST_MSG) {
errmsg = messages.getString("mboxWrongMessage") + "\n";
if (msg.type == MSG_ERROR) {
- errmsg += "ERROR MSG: " + Integer.parseInt(new String(msg.body), 16) + "\n";
+ errmsg += "ERROR MSG: " + hexStrToDecimalStr(new String(msg.body)) + "\n";
}
return true;
}
@@ -368,13 +387,13 @@
in2Socket.close();

if (ctl.recv_msg(msg) != 0) {
- errmsg = messages.getString("protocolError") + Integer.parseInt(new String(msg.body), 16) + " instead\n";
+ errmsg = messages.getString("protocolError") + hexStrToDecimalStr(new String(msg.body)) + " instead\n";
return true;
}
if (msg.type != TEST_FINALIZE) {
errmsg = messages.getString("mboxWrongMessage");
if (msg.type == MSG_ERROR) {
- errmsg += "ERROR MSG: " + Integer.parseInt(new String(msg.body), 16) + "\n";
+ errmsg += "ERROR MSG: " + hexStrToDecimalStr(new String(msg.body)) + "\n";
}
return true;
}
@@ -395,13 +414,13 @@
emailText = messages.getString("checkingFirewalls") + " ";

if (ctl.recv_msg(msg) != 0) {
- errmsg = messages.getString("protocolError") + Integer.parseInt(new String(msg.body), 16) + " instead\n";
+ errmsg = messages.getString("protocolError") + hexStrToDecimalStr(new String(msg.body)) + " instead\n";
return true;
}
if (msg.type != TEST_PREPARE) {
errmsg = messages.getString("sfwWrongMessage") + "\n";
if (msg.type == MSG_ERROR) {
- errmsg += "ERROR MSG: " + Integer.parseInt(new String(msg.body), 16) + "\n";
+ errmsg += "ERROR MSG: " + hexStrToDecimalStr(new String(msg.body)) + "\n";
}
return true;
}
@@ -441,13 +460,13 @@
ctl.send_msg(TEST_MSG, Integer.toString(srvSocket.getLocalPort()).getBytes());

if (ctl.recv_msg(msg) != 0) {
- errmsg = messages.getString("protocolError") + Integer.parseInt(new String(msg.body), 16) + " instead\n";
+ errmsg = messages.getString("protocolError") + hexStrToDecimalStr(new String(msg.body)) + " instead\n";
return true;
}
if (msg.type != TEST_START) {
errmsg = messages.getString("sfwWrongMessage");
if (msg.type == MSG_ERROR) {
- errmsg += "ERROR MSG: " + Integer.parseInt(new String(msg.body), 16) + "\n";
+ errmsg += "ERROR MSG: " + hexStrToDecimalStr(new String(msg.body)) + "\n";
}
return true;
}
@@ -467,13 +486,13 @@
}

if (ctl.recv_msg(msg) != 0) {
- errmsg = messages.getString("protocolError") + Integer.parseInt(new String(msg.body), 16) + " instead\n";
+ errmsg = messages.getString("protocolError") + hexStrToDecimalStr(new String(msg.body)) + " instead\n";
return true;
}
if (msg.type != TEST_MSG) {
errmsg = messages.getString("sfwWrongMessage") + "\n";
if (msg.type == MSG_ERROR) {
- errmsg += "ERROR MSG: " + Integer.parseInt(new String(msg.body), 16) + "\n";
+ errmsg += "ERROR MSG: " + hexStrToDecimalStr(new String(msg.body)) + "\n";
}
return true;
}
@@ -482,13 +501,13 @@
osfwTest.finalize();

if (ctl.recv_msg(msg) != 0) {
- errmsg = messages.getString("protocolError") + Integer.parseInt(new String(msg.body), 16) + " instead\n";
+ errmsg = messages.getString("protocolError") + hexStrToDecimalStr(new String(msg.body)) + " instead\n";
return true;
}
if (msg.type != TEST_FINALIZE) {
errmsg = messages.getString("sfwWrongMessage") + "\n";
if (msg.type == MSG_ERROR) {
- errmsg += "ERROR MSG: " + Integer.parseInt(new String(msg.body), 16) + "\n";
+ errmsg += "ERROR MSG: " + hexStrToDecimalStr(new String(msg.body)) + "\n";
}
return true;
}
@@ -511,13 +530,13 @@
emailText += messages.getString("runningOutboundTest") + " ";

if (ctl.recv_msg(msg) != 0) {
- errmsg = messages.getString("protocolError") + Integer.parseInt(new String(msg.body), 16) + " instead\n";
+ errmsg = messages.getString("protocolError") + hexStrToDecimalStr(new String(msg.body)) + " instead\n";
return true;
}
if (msg.type != TEST_PREPARE) {
errmsg = messages.getString("outboundWrongMessage") + "\n";
if (msg.type == MSG_ERROR) {
- errmsg += "ERROR MSG: " + Integer.parseInt(new String(msg.body), 16) + "\n";
+ errmsg += "ERROR MSG: " + hexStrToDecimalStr(new String(msg.body)) + "\n";
}
return true;
}
@@ -546,13 +565,13 @@
// wait here for signal from server application
// This signal tells the client to start pumping out data
if (ctl.recv_msg(msg) != 0) {
- errmsg = messages.getString("protocolError") + Integer.parseInt(new String(msg.body), 16) + " instead\n";
+ errmsg = messages.getString("protocolError") + hexStrToDecimalStr(new String(msg.body)) + " instead\n";
return true;
}
if (msg.type != TEST_START) {
errmsg = messages.getString("outboundWrongMessage") + "\n";
if (msg.type == MSG_ERROR) {
- errmsg += "ERROR MSG: " + Integer.parseInt(new String(msg.body), 16) + "\n";
+ errmsg += "ERROR MSG: " + hexStrToDecimalStr(new String(msg.body)) + "\n";
}
return true;
}
@@ -592,13 +611,13 @@
c2sspd = ((8.0 * pkts * lth) / 1000) / t;
/* receive the c2sspd from the server */
if (ctl.recv_msg(msg) != 0) {
- errmsg = messages.getString("protocolError") + Integer.parseInt(new String(msg.body), 16) + " instead\n";
+ errmsg = messages.getString("protocolError") + hexStrToDecimalStr(new String(msg.body)) + " instead\n";
return true;
}
if (msg.type != TEST_MSG) {
errmsg = messages.getString("outboundWrongMessage");
if (msg.type == MSG_ERROR) {
- errmsg += "ERROR MSG: " + Integer.parseInt(new String(msg.body), 16) + "\n";
+ errmsg += "ERROR MSG: " + hexStrToDecimalStr(new String(msg.body)) + "\n";
}
return true;
}
@@ -620,13 +639,13 @@
uiServices.setVariable("pub_c2sspd", sc2sspd);

if (ctl.recv_msg(msg) != 0) {
- errmsg = messages.getString("protocolError") + Integer.parseInt(new String(msg.body), 16) + " instead\n";
+ errmsg = messages.getString("protocolError") + hexStrToDecimalStr(new String(msg.body)) + " instead\n";
return true;
}
if (msg.type != TEST_FINALIZE) {
errmsg = messages.getString("outboundWrongMessage");
if (msg.type == MSG_ERROR) {
- errmsg += "ERROR MSG: " + Integer.parseInt(new String(msg.body), 16) + "\n";
+ errmsg += "ERROR MSG: " + hexStrToDecimalStr(new String(msg.body)) + "\n";
}
return true;
}
@@ -645,13 +664,13 @@
emailText += messages.getString("runningInboundTest") + " ";

if (ctl.recv_msg(msg) != 0) {
- errmsg = messages.getString("protocolError") + Integer.parseInt(new String(msg.body), 16) + " instead\n";
+ errmsg = messages.getString("protocolError") + hexStrToDecimalStr(new String(msg.body)) + " instead\n";
return true;
}
if (msg.type != TEST_PREPARE) {
errmsg = messages.getString("inboundWrongMessage") + "\n";
if (msg.type == MSG_ERROR) {
- errmsg += "ERROR MSG: " + Integer.parseInt(new String(msg.body), 16) + "\n";
+ errmsg += "ERROR MSG: " + hexStrToDecimalStr(new String(msg.body)) + "\n";
}
return true;
}
@@ -678,13 +697,13 @@

// wait here for signal from server application
if (ctl.recv_msg(msg) != 0) {
- errmsg = messages.getString("unknownServer") + Integer.parseInt(new String(msg.body), 16) + " instead\n";
+ errmsg = messages.getString("protocolError") + hexStrToDecimalStr(new String(msg.body)) + " instead\n";
return true;
}
if (msg.type != TEST_START) {
errmsg = messages.getString("serverFail") + "\n";
if (msg.type == MSG_ERROR) {
- errmsg += "ERROR MSG: " + Integer.parseInt(new String(msg.body), 16) + "\n";
+ errmsg += "ERROR MSG: " + hexStrToDecimalStr(new String(msg.body)) + "\n";
}
return true;
}
@@ -707,13 +726,13 @@

/* receive the s2cspd from the server */
if (ctl.recv_msg(msg) != 0) {
- errmsg = messages.getString("protocolError") + Integer.parseInt(new String(msg.body), 16) + " instead\n";
+ errmsg = messages.getString("protocolError") + hexStrToDecimalStr(new String(msg.body)) + " instead\n";
return true;
}
if (msg.type != TEST_MSG) {
errmsg = messages.getString("inboundWrongMessage") + "\n";
if (msg.type == MSG_ERROR) {
- errmsg += "ERROR MSG: " + Integer.parseInt(new String(msg.body), 16) + "\n";
+ errmsg += "ERROR MSG: " + hexStrToDecimalStr(new String(msg.body)) + "\n";
}
return true;
}
@@ -762,7 +781,7 @@
try {
for (;;) {
if (ctl.recv_msg(msg) != 0) {
- errmsg = messages.getString("protocolError") + Integer.parseInt(new String(msg.body), 16) + " instead\n";
+ errmsg = messages.getString("protocolError") + hexStrToDecimalStr(new String(msg.body)) + " instead\n";
return true;
}
if (msg.type == TEST_FINALIZE) {
@@ -771,7 +790,7 @@
if (msg.type != TEST_MSG) {
errmsg = messages.getString("inboundWrongMessage") + "\n";
if (msg.type == MSG_ERROR) {
- errmsg += "ERROR MSG: " + Integer.parseInt(new String(msg.body), 16) + "\n";
+ errmsg += "ERROR MSG: " + hexStrToDecimalStr(new String(msg.body)) + "\n";
}
return true;
}
@@ -783,7 +802,7 @@
}
return false;
}
-
+
public boolean test_meta(Protocol ctl, String application) throws IOException
{
Message msg = new Message();
@@ -794,25 +813,25 @@
emailText += messages.getString("sendingMetaInformation") + " ";

if (ctl.recv_msg(msg) != 0) {
- errmsg = messages.getString("protocolError") + Integer.parseInt(new String(msg.body), 16) + " instead\n";
+ errmsg = messages.getString("protocolError") + hexStrToDecimalStr(new String(msg.body)) + " instead\n";
return true;
}
if (msg.type != TEST_PREPARE) {
errmsg = messages.getString("metaWrongMessage") + "\n";
if (msg.type == MSG_ERROR) {
- errmsg += "ERROR MSG: " + Integer.parseInt(new String(msg.body), 16) + "\n";
+ errmsg += "ERROR MSG: " + hexStrToDecimalStr(new String(msg.body)) + "\n";
}
return true;
}

if (ctl.recv_msg(msg) != 0) {
- errmsg = messages.getString("protocolError") + Integer.parseInt(new String(msg.body), 16) + " instead\n";
+ errmsg = messages.getString("protocolError") + hexStrToDecimalStr(new String(msg.body)) + " instead\n";
return true;
}
if (msg.type != TEST_START) {
errmsg = messages.getString("metaWrongMessage") + "\n";
if (msg.type == MSG_ERROR) {
- errmsg += "ERROR MSG: " + Integer.parseInt(new String(msg.body), 16) + "\n";
+ errmsg += "ERROR MSG: " + hexStrToDecimalStr(new String(msg.body)) + "\n";
}
return true;
}
@@ -826,13 +845,13 @@
ctl.send_msg(TEST_MSG, new byte[0]);

if (ctl.recv_msg(msg) != 0) {
- errmsg = messages.getString("protocolError") + Integer.parseInt(new String(msg.body), 16) + " instead\n";
+ errmsg = messages.getString("protocolError") + hexStrToDecimalStr(new String(msg.body)) + " instead\n";
return true;
}
if (msg.type != TEST_FINALIZE) {
errmsg = messages.getString("metaWrongMessage");
if (msg.type == MSG_ERROR) {
- errmsg += "ERROR MSG: " + Integer.parseInt(new String(msg.body), 16) + "\n";
+ errmsg += "ERROR MSG: " + hexStrToDecimalStr(new String(msg.body)) + "\n";
}
return true;
}
@@ -894,7 +913,7 @@

for (;;) {
if (ctl.recv_msg(msg) != 0) {
- errmsg = messages.getString("protocolError") + Integer.parseInt(new String(msg.body), 16) + " instead\n";
+ errmsg = messages.getString("protocolError") + hexStrToDecimalStr(new String(msg.body)) + " instead\n";
failed = true;
return;
}
@@ -944,7 +963,7 @@
uiServices.onLoginSent();

if (ctl.recv_msg(msg) != 0) {
- errmsg = messages.getString("protocolError") + Integer.parseInt(new String(msg.body), 16) + " instead\n";
+ errmsg = messages.getString("protocolError") + hexStrToDecimalStr(new String(msg.body)) + " instead\n";
failed = true;
return;
}
@@ -963,7 +982,7 @@
System.out.println("Server version: " + vVersion.substring(1));

if (ctl.recv_msg(msg) != 0) {
- errmsg = messages.getString("protocolError") + Integer.parseInt(new String(msg.body), 16) + " instead\n";
+ errmsg = messages.getString("protocolError") + hexStrToDecimalStr(new String(msg.body)) + " instead\n";
failed = true;
return;
}
@@ -1051,7 +1070,7 @@
try {
for (;;) {
if (ctl.recv_msg(msg) != 0) {
- errmsg = messages.getString("protocolError") + Integer.parseInt(new String(msg.body), 16) + " instead\n";
+ errmsg = messages.getString("protocolError") + hexStrToDecimalStr(new String(msg.body)) + " instead\n";
failed = true;
return;
}
@@ -1798,6 +1817,7 @@
else if(sysvar.equals("cwndtime:")) {
cwndtime = sysval;
uiServices.setVariable("pub_cwndtime", cwndtime);
+ uiServices.setVariable("pub_pctcwndtime",
cwndtime*100.0);
}
else if(sysvar.equals("rttsec:"))
rttsec = sysval;


  • [ndt-dev] [ndt] r793 committed - commit patch for http://code.google.com/p/ndt/issues/detail?id=67, ndt, 12/05/2012

Archive powered by MHonArc 2.6.16.

Top of Page