Skip to Content.
Sympa Menu

ndt-dev - [ndt-dev] [ndt] r1173 committed - Merge Issue162 branch into trunk

Subject: NDT-DEV email list created

List archive

[ndt-dev] [ndt] r1173 committed - Merge Issue162 branch into trunk


Chronological Thread 
  • From:
  • To:
  • Subject: [ndt-dev] [ndt] r1173 committed - Merge Issue162 branch into trunk
  • Date: Fri, 09 Jan 2015 15:36:41 +0000

Revision: 1173
Author:

Date: Fri Jan 9 15:36:25 2015 UTC
Log: Merge Issue162 branch into trunk


https://code.google.com/p/ndt/source/detail?r=1173

Added:
/trunk/HTML5-frontend/Makefile.am
/trunk/flash-client/precompiled
/trunk/flashpolicy.xml
/trunk/ndt-flashpolicyd
Modified:
/trunk
/trunk/Applet/precompiled/Tcpbw100.jar
/trunk/HTML5-frontend/script.js
/trunk/HTML5-frontend/style.css
/trunk/HTML5-frontend/widget.html
/trunk/Makefile.am
/trunk/conf/ndt-apache.conf
/trunk/conf/ndt-init
/trunk/conf/ndt-sysconfig
/trunk/configure.ac
/trunk/flash-client/Makefile.am
/trunk/ndt.spec
/trunk/src/fakewww.c
Replaced:
/trunk/flash-client/precompiled/FlashClt.swf

=======================================
--- /dev/null
+++ /trunk/HTML5-frontend/Makefile.am Fri Jan 9 15:36:25 2015 UTC
@@ -0,0 +1,26 @@
+#########################################################################
+# #
+# Copyright (C) 2014 #
+# Internet2 #
+# All Rights Reserved #
+# #
+#########################################################################
+#
+# File: Makefile.am
+#
+# Author: Paweł Gesek
+#
+# Date: Thu Nov 6 16:23:02 CET 2014
+#
+# Description: Makefile for the new HTML5 frontend
+
+TEMPDIRS = dist
+
+ndtdir = $(prefix)/ndt
+
+nobase_ndt_DATA = jquery-1.4.4.min.js ie.css style.css gauge.min.js widget.html \
+ images/mlab-logo.png images/mlab-logo-small.png script.js \
+ fonts/digital-7-mono.ttf fonts/League_Gothic.otf \
+ fonts/League_Gothic.eot embed.html set-active-client.sh
+
+EXTRA_DIST = $(nobase_ndt_DATA)
=======================================
--- /dev/null
+++ /trunk/flashpolicy.xml Fri Jan 9 15:36:25 2015 UTC
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+ <!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd";>
+ <cross-domain-policy>
+ <site-control permitted-cross-domain-policies="master-only"/>
+ <allow-access-from domain="*" to-ports="*" />
+ </cross-domain-policy>
=======================================
--- /dev/null
+++ /trunk/ndt-flashpolicyd Fri Jan 9 15:36:25 2015 UTC
@@ -0,0 +1,95 @@
+#!/usr/bin/python
+#
+# flashpolicyd.py
+# Simple socket policy file server for Flash
+#
+# Usage: flashpolicyd.py [--port=N] --file=FILE
+#
+# Logs to stderr
+# Requires Python 2.5 or later
+
+from __future__ import with_statement
+
+import sys
+import optparse
+import socket
+import thread
+import exceptions
+import contextlib
+
+VERSION = 0.1
+PORT = 843 # Listen on PORT.
+FILE = '/usr/local/ndt/flashpolicy.xml' # Full path to the default server policy file.
+
+class policy_server(object):
+ def __init__(self, port, path):
+ self.port = port
+ self.path = path
+ self.policy = self.read_policy(path)
+ self.log('Listening on port %d\n' % port)
+ try:
+ self.sock = socket.socket(socket.AF_INET6, socket.SOCK_STREAM)
+ except AttributeError:
+ # AttributeError catches Python built without IPv6
+ self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+ except socket.error:
+ # socket.error catches OS with IPv6 disabled
+ self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+ self.sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
+ self.sock.bind(('', port))
+ self.sock.listen(5)
+ def read_policy(self, path):
+ with file(path, 'rb') as f:
+ policy = f.read(10001)
+ if len(policy) > 10000:
+ raise exceptions.RuntimeError('File probably too large to be a policy file',
+ path)
+ if 'cross-domain-policy' not in policy:
+ raise exceptions.RuntimeError('Not a valid policy file',
+ path)
+ return policy
+ def run(self):
+ try:
+ while True:
+ thread.start_new_thread(self.handle, self.sock.accept())
+ except socket.error, e:
+ self.log('Error accepting connection: %s' % (e[1],))
+ def handle(self, conn, addr):
+ addrstr = '%s:%s' % (addr[0],addr[1])
+ try:
+ self.log('Connection from %s' % (addrstr,))
+ with contextlib.closing(conn):
+ # It's possible that we won't get the entire request in
+ # a single recv, but very unlikely.
+ request = conn.recv(1024).strip()
+ if request != '<policy-file-request/>\0':
+ self.log('Unrecognized request from %s: %s' % (addrstr, request))
+ return
+ self.log('Valid request received from %s' % (addrstr,))
+ conn.sendall(self.policy)
+ self.log('Sent policy file to %s' % (addrstr,))
+ except socket.error, e:
+ self.log('Error handling connection from %s: %s' % (addrstr, e[1]))
+ except Exception, e:
+ self.log('Error handling connection from %s: %s' % (addrstr, e[1]))
+ def log(self, str):
+ print >>sys.stderr, str
+
+def main():
+ try:
+ usage = "usage: %prog [options]"
+
+ parser = optparse.OptionParser(usage=usage)
+ parser.add_option("-f", "--file", dest="file", help="The flashpolicy.xml file that will be served", metavar="FILE", default = FILE)
+
+ (options, args) = parser.parse_args()
+
+ policy_server(PORT, options.file).run()
+ except Exception, e:
+ print >> sys.stderr, e
+ sys.exit(1)
+ except KeyboardInterrupt:
+ pass
+
+if __name__ == '__main__':
+ main()
=======================================
--- /trunk/Applet/precompiled/Tcpbw100.jar Wed Jun 25 18:48:32 2014 UTC
+++ /trunk/Applet/precompiled/Tcpbw100.jar Fri Jan 9 15:36:25 2015 UTC
Binary file, no diff available.
=======================================
--- /trunk/HTML5-frontend/script.js Fri Nov 14 15:16:55 2014 UTC
+++ /trunk/HTML5-frontend/script.js Fri Jan 9 15:36:25 2015 UTC
@@ -487,8 +487,8 @@
app.name = 'NDT';
app.archive = 'Tcpbw100.jar';
app.code = 'edu.internet2.ndt.Tcpbw100.class';
- app.width = '400';
- app.height = '400';
+ app.width = '600';
+ app.height = '10';
document.getElementById('backendContainer').appendChild(app);
$('#flashButton').removeClass("active");
$('#javaButton').addClass("active");
=======================================
--- /trunk/HTML5-frontend/style.css Fri Nov 14 15:16:55 2014 UTC
+++ /trunk/HTML5-frontend/style.css Fri Jan 9 15:36:25 2015 UTC
@@ -33,7 +33,6 @@
margin: 10px;
}
#warning {
- font-size: 20px;
color: red;
margin: 10px;
}
@@ -138,7 +137,7 @@
}

#welcome .info {
- padding-top: 50px;
+ padding-top: 10px;
text-transform: none;
font: 13px/18px verdana, helvetica, arial, sans-serif;
}
=======================================
--- /trunk/HTML5-frontend/widget.html Fri Nov 14 15:16:55 2014 UTC
+++ /trunk/HTML5-frontend/widget.html Fri Jan 9 15:36:25 2015 UTC
@@ -18,27 +18,27 @@
</head>
<body class="initializing">
<div class="header">
- <p>You can choose which plugin (flash/java) you want to use by clicking on proper button below. <br />
- Make sure that specific plugin is not blocked by your browser (if you use some kind of "flash block" extension <br />
- then you may need to click on small bar at the bottom of this page to enable content).</p>
-</div>
-<div>
- <button id="javaButton" class="backendButton button" onclick="useJavaAsBackend()" type="button">Use java</button>
- <button id="flashButton" class="backendButton button" onclick="useFlashAsBackend()" type="button">Use flash</button>
-</div>
-<div id="warning">
- <p>Selected plugin was not loaded properly. <br />
- Make sure that you have proper plugin installed and it is not blocked by your browser.</p>
</div>
<div id="widget">
<div id="welcome" class="page">
<div class="info">

- <p class="mlab logo"><a href="http://www.measurementlab.net/";><img src="images/mlab-logo.png" alt="Measurement Lab" /></a></p>
+ <p>The Network Diagnostic Tool (NDT) provides a sophisticated speed and diagnostic test. An NDT test reports more than just the upload and download speeds &mdash; it also attempts to determine what, if any, problems limited these speeds, differentiating between computer configuration and network infrastructure problems. While the diagnostic messages are most useful for expert users, they can also help novice users by allowing them to provide detailed trouble reports to their network&nbsp;administrator.</p>

- <p>Network Diagnostic Tool (NDT) provides a sophisticated speed and diagnostic test. An NDT test reports more than just the upload and download speeds &mdash; it also attempts to determine what, if any, problems limited these speeds, differentiating between computer configuration and network infrastructure problems. While the diagnostic messages are most useful for expert users, they can also help novice users by allowing them to provide detailed trouble reports to their network&nbsp;administrator.</p>
+ <p>NDT makes use of either Flash or Java plugins to perform the test. Make sure that the plugin you choose is not blocked by your browser</p>

- <p class="mlab logo"><a href="http://www.measurementlab.net/";>Learn more about Measurement Lab</a></p>
+ <div id="warning">
+ <p>Selected plugin was not loaded properly. Make sure that you have proper plugin installed, and is not being blocked by your browser.</p>
+ </div>
+
+ <div>
+ <button id="javaButton" class="backendButton button" onclick="useJavaAsBackend()" type="button">Use Java</button>
+ <button id="flashButton" class="backendButton button" onclick="useFlashAsBackend()" type="button">Use Flash</button>
+ </div>
+
+ <div is="learn_more">
+ <a href="http://software.internet2.edu/ndt/";>Learn more about NDT</a> &ndash; <a href="http://www.measurementlab.net/";>Learn more about Measurement Lab</a>
+ </div>

</div>
<div class="status">
@@ -121,11 +121,9 @@
</div>

<div class="branding">
- <div class="logo">
- <a href="http://measurementlab.net/about"; target="_blank"><img src="images/mlab-logo-small.png" /></a>
- </div>
<div class="text">
- <a href="http://measurementlab.net/about"; target="_blank">More information about M-Lab</a>
+ <a href="http://software.internet2.edu/ndt/"; target="_blank">More information about NDT</a> <br />
+ <a href="http://measurementlab.net/about"; target="_blank">More information about Measurement Lab</a>
</div>
</div>

@@ -140,7 +138,7 @@
<!--Use embed tag to have flash client being background for JS UI or applet tag if you want to use java applet instead. -->
<embed id="NDT" name="NDT" type="application/x-shockwave-flash" src="FlashClt.swf" width="600" height="10" />

- <!--<applet id="NDT" name="NDT" code="edu.internet2.ndt.Tcpbw100.class" codebase="<?php print $applet_url ?>" archive="Tcpbw100.jar" width="400" height="10"></applet>-->
+ <!--<applet id="NDT" width="600" height="10" name="NDT" code="edu.internet2.ndt.Tcpbw100.class" codebase="<?php print $applet_url ?>" archive="Tcpbw100.jar" width="400" height="10"></applet>-->
</div>

</body>
=======================================
--- /trunk/Makefile.am Thu Jun 26 15:32:26 2014 UTC
+++ /trunk/Makefile.am Fri Jan 9 15:36:25 2015 UTC
@@ -16,20 +16,26 @@
# Description: toplevel build for bwctl
#

-SUBDIRS = @TOP_BUILD_DIRS@ src conf doc
+SUBDIRS = @TOP_BUILD_DIRS@ src conf doc HTML5-frontend

if INCLUDE_APPLET
SUBDIRS += Applet
endif

+if INCLUDE_FLASH
+SUBDIRS += flash-client
+endif
+
if HAVE_GCJ
SUBDIRS += Admin janalyze
-if HAVE_MXMLC
-if BUILD_FLASH_CLT
-SUBDIRS += flash-client
endif
-endif
-endif
+
+sbin_SCRIPTS = ndt-flashpolicyd
+
+
+ndtdir = $(prefix)/ndt
+ndt_DATA = admin_description.html admin.html flashpolicy.xml \
+ copyright.html web100variables.html web100_variables

EXTRA_DIST = admin_description.html admin.html \
tcpbw100.template tcpbw100-java.template copyright.html web100variables.html \
@@ -38,21 +44,10 @@
contrib/README contrib/loadmap.intro contrib/loadmap.js \
contrib/loadmap.txt contrib/Tcpbw1001.java \
tfw/client.py tfw/communication.py tfw/hosts.py tfw/network.py \
- tfw/Readme tfw/scenarios.py tfw/server.py tfw/traffics.py
tfw/widgets.py
-
-ndtdir = $(prefix)/ndt
-ndt_DATA = admin_description.html admin.html \
- copyright.html web100variables.html web100_variables
+ tfw/Readme tfw/scenarios.py tfw/server.py tfw/traffics.py
tfw/widgets.py \
+ $(sbin_SCRIPTS) $(ndt_DATA)

sdatadir:
test -z "$(DESTDIR)$(ndtdir)/serverdata" || $(mkdir_p) "$(DESTDIR)$(ndtdir)/serverdata"

install: sdatadir install-recursive
-
-# uncomment this when we stop using broken automake 1.5
-# (then remove from DIST_EXTRA in subdir)
-#nobase_include_HEADERS = bwlib/bwlib.h
-
-#EXTRA_DIST = bootstrap
-#MAINTAINERCLEANFILES = aclocal.m4 Makefile.in configure config.log \
-# config.status
=======================================
--- /trunk/conf/ndt-apache.conf Mon Jun 23 20:04:04 2014 UTC
+++ /trunk/conf/ndt-apache.conf Fri Jan 9 15:36:25 2015 UTC
@@ -3,7 +3,7 @@
<VirtualHost *:7123>
DocumentRoot /usr/ndt
<Directory /usr/ndt>
- DirectoryIndex tcpbw100.html
+ DirectoryIndex widget.html
AllowOverride None
</Directory>

=======================================
--- /trunk/conf/ndt-init Fri Jun 20 14:26:21 2014 UTC
+++ /trunk/conf/ndt-init Fri Jan 9 15:36:25 2015 UTC
@@ -27,6 +27,7 @@

[ -f $path/web100srv ] || exit 0
[ -f $path/fakewww ] || exit 0
+[ -f $path/ndt-flashpolicyd ] || exit 0

RETVAL=0

@@ -70,6 +71,30 @@
echo "fakewww disabled - see /etc/sysconfig/ndt"
fi
}
+
+start_flashpolicyd ()
+{
+if [ ! $USE_FLASHPOLICYD = 0 ]
+then
+ if [ ! -n "`pidof -x $path/ndt-flashpolicyd`" ]; then
+ echo -n "Starting flashpolicyd:"
+ $path/ndt-flashpolicyd $FLASHPOLICYD_OPTIONS 2>/dev/null &
+ RETVAL=$?
+ if [ $RETVAL = 0 ]
+ then
+ success
+ touch /var/lock/subsys/ndt-flashpolicyd
+ else
+ failure
+ fi
+ echo
+ fi
+else
+ warning
+ echo "flashpolicyd disabled - see /etc/sysconfig/ndt"
+fi
+}
+

stop_web100srv ()
{
@@ -103,20 +128,46 @@
fi
}

+stop_flashpolicyd ()
+{
+ if [ ! $USE_FLASHPOLICYD = 0 ]
+ then
+ echo -n "Stopping flashpolicyd:"
+ killproc ndt-flashpolicyd -TERM
+ RETVAL=$?
+ echo
+ [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/ndt-flashpolicyd
+ else
+ status ndt-flashpolicyd 2>/dev/null
+ RETVAL=$?
+ if [ $RETVAL -eq 0 ]
+ then
+ warning
+ echo "flashpolicyd disabled, but is running"
+ else
+ success
+ echo "flashpolicyd disabled, not running"
+ fi
+ fi
+}
+

rhstatus() {
status web100srv
status fakewww
+ status ndt-flashpolicyd
}

stop() {
stop_web100srv
stop_fakewww
+ stop_flashpolicyd
}

start () {
start_web100srv
start_fakewww
+ start_flashpolicyd
}

restart() {
=======================================
--- /trunk/conf/ndt-sysconfig Fri Jun 20 14:26:21 2014 UTC
+++ /trunk/conf/ndt-sysconfig Fri Jan 9 15:36:25 2015 UTC
@@ -113,3 +113,10 @@
# extra options for fakewww - ignored unless USE_FAKEWWW is set to '1'
#FAKEWWW_OPTIONS="-f /index.html"
FAKEWWW_OPTIONS="-f /index.html -s -l /var/log/ndt/fakewww_access.log -e /var/log/ndt/fakewww_error.log"
+
+# Flash policy daemon options
+# -f FILE, --file=FILE The flashpolicy.xml file that will be served
+#
+# Whether to use the flash policy daemon; null or 0 to disable, 1 to enable
+USE_FLASHPOLICYD="1"
+FLASHPOLICYD_OPTIONS="-f /usr/ndt/flashpolicy.xml"
=======================================
--- /trunk/configure.ac Wed Nov 12 10:35:02 2014 UTC
+++ /trunk/configure.ac Fri Jan 9 15:36:25 2015 UTC
@@ -148,18 +148,41 @@


# Enabling/disabling flash client build
-AC_ARG_ENABLE(flash, [ --enable-flash=[yes/no] turn on flash client build
- [default=yes]],, enable_flash=yes)
+AC_ARG_WITH(flash, [ --enable-flash=[yes/no/precompiled/auto] turn on flash client build
+ [default=auto]],, enable_flash=yes)
+
+if test "x$with_flash" == "xauto"; then
+ AC_CHECK_PROGS(NDTMXMLC, mxmlc)
+ if test -n "$NDTMXMLC"; then
+ with_flash=yes
+ else
+ with_flash=precompiled
+ fi
+fi
+
+if test "x$with_flash" == "xyes"; then
+ AC_CHECK_PROGS(NDTMXMLC, mxmlc)
+ if test -z "$NDTMXMLC"; then
+ AC_MSG_FAILURE([mxmlc required to rebuild flash client but not available])
+ fi
+fi
+
+if test "x$with_flash" != "xno"; then
+ AM_CONDITIONAL(INCLUDE_FLASH, true)
+else
+ AM_CONDITIONAL(INCLUDE_FLASH, false)
+fi

-if test "x$enable_flash" != "xno"; then
- AM_CONDITIONAL(BUILD_FLASH_CLT, true)
+if test "x$with_flash" != "xprecompiled"; then
+ AM_CONDITIONAL(BUILD_FLASH, true)
else
- AM_CONDITIONAL(BUILD_FLASH_CLT, false)
+ AM_CONDITIONAL(BUILD_FLASH, false)
fi

+
AC_ARG_WITH(I2util,
AC_HELP_STRING([--with-I2util=<dir>],
- [defaults to building I2util under owamp if
exists]),
+ [defaults to building I2util under NDT if
exists]),
with_I2util=$withval, with_I2util=yes)

#
@@ -377,7 +400,7 @@
AC_SUBST(ac_aux_dir)
AC_CONFIG_FILES([Makefile
src/Makefile Admin/Makefile Applet/Makefile
- conf/Makefile doc/Makefile janalyze/Makefile
flash-client/Makefile])
+ conf/Makefile doc/Makefile janalyze/Makefile flash-client/Makefile HTML5-frontend/Makefile])
AC_OUTPUT

echo ""
@@ -458,14 +481,10 @@
SUMMARY_JANALYZEJAR="NO (missing java compiler)"
fi

-if test -z "$HAVE_MXMLC_TRUE" && test -n "$HAVE_MXMLC_FALSE"; then
-if test "x$enable_flash" != "xno"; then
+if test "x$with_flash" != "xno"; then
SUMMARY_FLASHCLT="YES"
else
-SUMMARY_FLASHCLT="NO (disabled by user)"
-fi
-else
-SUMMARY_FLASHCLT="NO (missing action script compiler)"
+SUMMARY_FLASHCLT="NO"
fi

if test "$SUMMARY_WEB100CLT" = "YES" && test "$SUMMARY_FLASHCLT" = "YES" && test "$SUMMARY_TCPBW100JAR" = "YES"; then
=======================================
--- /trunk/flash-client/Makefile.am Wed Feb 5 13:31:05 2014 UTC
+++ /trunk/flash-client/Makefile.am Fri Jan 9 15:36:25 2015 UTC
@@ -34,7 +34,11 @@
mkdir -p dist

FlashClt.swf: $(TEMPDIRS)
+if BUILD_FLASH
$(NDTMXMLC) src/Main.as $(NDTMXMLCFLAGS);
+else
+ cp precompiled/FlashClt.swf dist
+endif

mostlyclean-generic:
rm -rf $(TEMPDIRS) *~
@@ -43,5 +47,6 @@
src/locale/ca_ES/DisplayMessages.properties src/locale/el_GR/DisplayMessages.properties \
src/locale/en_US/DisplayMessages.properties src/locale/fr_FR/DisplayMessages.properties \
src/locale/nb_NO/DisplayMessages.properties src/locale/nl_NL/DisplayMessages.properties \
- src/locale/pt_BR/DisplayMessages.properties src/locale/ru_RU/DisplayMessages.properties
+ src/locale/pt_BR/DisplayMessages.properties src/locale/ru_RU/DisplayMessages.properties \
+ precompiled/FlashClt.swf

=======================================
--- /trunk/ndt.spec Fri Jun 27 13:41:49 2014 UTC
+++ /trunk/ndt.spec Fri Jan 9 15:36:25 2015 UTC
@@ -41,6 +41,7 @@
Requires: I2util, chkconfig, initscripts, shadow-utils, coreutils
Requires: web100_userland, libpcap
Requires: jansson
+Requires: python >= 2.5

%description server
NDT server that enables end users to run performance tests
@@ -59,9 +60,9 @@

%build
%if "%{?CERT_FILE}" == ""
-%configure --with-I2util=%{_libdir} --enable-fakewww --with-java=precompiled
+%configure --with-I2util=%{_libdir} --enable-fakewww --with-java=precompiled --with-flash=precompiled
%else
-%configure --with-I2util=%{_libdir} --enable-fakewww --with-java=precompiled --with-cert="%{CERT_FILE}" --with-alias="%{CERT_ALIAS}"
+%configure --with-I2util=%{_libdir} --enable-fakewww --with-java=precompiled --with-cert="%{CERT_FILE}" --with-alias="%{CERT_ALIAS}" --with-flash=precompiled
%endif

#make %{?_smp_mflags}
@@ -109,13 +110,13 @@
%files server
%defattr(-,root,root,-)
%{_sbindir}/*
-%config(noreplace) %{_initrddir}/%{name}
+%{_initrddir}/%{name}
%config(noreplace) %{_sysconfdir}/sysconfig/%{name}
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
%dir %{_prefix}/%{name}
%dir %{_localstatedir}/lib/%{name}
%dir %{_localstatedir}/log/%{name}
-%{_prefix}/%{name}/[^d]*
+%{_prefix}/%{name}/*
%{_mandir}/man5/*
%{_mandir}/man8/*
%{_mandir}/man1/analyze.1.gz
@@ -137,6 +138,9 @@
%{_bindir}/ndtclt

%changelog
+* Wed Nov 12 2014 Aaron Brown
<>
- 3.7.0-1
+- Initial NDT 3.7.0 release candidate RPM
+
* Tue Sep 25 2012 Kavitha Kumar
<>
- 3.6.5.2
- Change NDT version to 3.6.5.2_rc2

=======================================
--- /trunk/src/fakewww.c Mon Jun 23 19:06:26 2014 UTC
+++ /trunk/src/fakewww.c Fri Jan 9 15:36:25 2015 UTC
@@ -64,8 +64,8 @@
"automatically redirected in the next 2 seconds.\n "
"</font></BODY>\n</HTML>";

-char *Mypagefile = "/tcpbw100.html"; /* we throw the slash away */
-char *okfile[] = { "/tcpbw100.html", "/Tcpbw100.class", "/Tcpbw100$1.class",
+char *Mypagefile = "/widget.html"; /* we throw the slash away */
+char *okfile[] = { "/widget.html", "/Tcpbw100.class", "/Tcpbw100$1.class",
"/Tcpbw100$clsFrame.class", "/Tcpbw100.jar", "/copyright.html",
"/web100variables.html", "/"ADMINFILE, "/Admin.class", "/tr.sh",
"/traceroute.pl", "/Tcpbw100$MyTextPane.class",
@@ -73,7 +73,11 @@
"/Tcpbw100$3.class", "/Tcpbw100$OsfwWorker.class",
"/Tcpbw100$Message.class", "/Tcpbw100$StatusPanel$1.class",
"/Tcpbw100$clsFrame$1.class", "/Tcpbw100$TestWorker.class",
- "/lib/json-simple-1.1.1.jar", "/crossdomain.xml", 0 };
+ "/lib/json-simple-1.1.1.jar", "/crossdomain.xml",
+ "/embed.html", "/tcpbw100.html", "/FlashClt.swf", "/script.js", "/ie.css",
+ "/gauge.min.js", "/jquery-1.4.4.min.js", "/style.css",
+ "/fonts/digital-7-mono.ttf", "/fonts/League_Gothic.eot",
"/fonts/League_Gothic.otf",
+ "/images/mlab-logo.png", "/images/mlab-logo-small.png", 0 };

typedef struct allowed {
char* filename;
@@ -495,7 +499,7 @@

writen(sd, MsgRedir1, strlen(MsgRedir1));
writen(sd, MsgRedir2, strlen(MsgRedir2));
- snprintf(line, sizeof(line), "http://%u.%u.%u.%u:%s/tcpbw100.html";,
+ snprintf(line, sizeof(line), "http://%u.%u.%u.%u:%s/widget.html";,
srv_addr & 0xff, (srv_addr >> 8) & 0xff,
(srv_addr >> 16) & 0xff, (srv_addr >> 24) & 0xff,
port);
@@ -504,7 +508,7 @@
writen(sd, MsgRedir4, strlen(MsgRedir4));
answerSize = strlen(MsgRedir4);
snprintf(line, sizeof(line),
- "url=http://%u.%u.%u.%u:%s/tcpbw100.html";,
+ "url=http://%u.%u.%u.%u:%s/widget.html";,
srv_addr & 0xff, (srv_addr >> 8) & 0xff,
(srv_addr >> 16) & 0xff, (srv_addr >> 24) & 0xff,
port);
@@ -513,7 +517,7 @@
writen(sd, MsgRedir5, strlen(MsgRedir5));
answerSize += strlen(MsgRedir5);
snprintf(line, sizeof(line),
- "href=\"http://%u.%u.%u.%u:%s/tcpbw100.html\"";,
+ "href=\"http://%u.%u.%u.%u:%s/widget.html\"";,
srv_addr & 0xff, (srv_addr >> 8) & 0xff,
(srv_addr >> 16) & 0xff, (srv_addr >> 24) & 0xff,
port);
@@ -586,19 +590,19 @@

writen(sd, MsgRedir1, strlen(MsgRedir1));
writen(sd, MsgRedir2, strlen(MsgRedir2));
- snprintf(line, sizeof(line), "http://[%s]:%s/tcpbw100.html";,
+ snprintf(line, sizeof(line), "http://[%s]:%s/widget.html";,
onenodename, port);
writen(sd, line, strlen(line));
writen(sd, MsgRedir3, strlen(MsgRedir3));
writen(sd, MsgRedir4, strlen(MsgRedir4));
answerSize = strlen(MsgRedir4);
- snprintf(line, sizeof(line), "url=http://[%s]:%s/tcpbw100.html";,
+ snprintf(line, sizeof(line), "url=http://[%s]:%s/widget.html";,
onenodename, port);
writen(sd, line, strlen(line));
answerSize += strlen(line);
writen(sd, MsgRedir5, strlen(MsgRedir5));
answerSize += strlen(MsgRedir5);
- snprintf(line, sizeof(line), "href=\"http://[%s]:%s/tcpbw100.html\"";,
+ snprintf(line, sizeof(line), "href=\"http://[%s]:%s/widget.html\"";,
onenodename, port);
writen(sd, line, strlen(line));
answerSize += strlen(line);
@@ -622,7 +626,7 @@
tt = time(0);
ok = 0;
if (strcmp(filename, "/") == 0)
- strncpy(filename, "/tcpbw100.html", 15);
+ strncpy(filename, "/widget.html", 15);
for (i = 0; okfile[i]; i++) {
/* restrict file access */
if (strcmp(okfile[i], filename) == 0) {
=======================================
--- /branches/Issue162/flash-client/precompiled/FlashClt.swf Wed Nov 12 15:57:16 2014 UTC
+++ /trunk/flash-client/precompiled/FlashClt.swf Fri Jan 9 15:36:25 2015 UTC
Binary file, no diff available.


  • [ndt-dev] [ndt] r1173 committed - Merge Issue162 branch into trunk, ndt, 01/09/2015

Archive powered by MHonArc 2.6.16.

Top of Page