diff --git a/openmptcprouter-full/Makefile b/openmptcprouter-full/Makefile index a334cc675..7e6d1a797 100644 --- a/openmptcprouter-full/Makefile +++ b/openmptcprouter-full/Makefile @@ -37,6 +37,7 @@ MY_DEPENDS := \ luci-app-vnstat omr-quota luci-app-omr-quota \ luci-app-mptcp luci-app-openmptcprouter luci-app-omr-bypass \ omr-6in4 ip6tables-mod-nat luci-proto-ipv6 6to4 6in4 6rd iputils-traceroute6 \ + speedtestc \ ethtool \ luci-proto-3g \ luci-app-mlvpn mlvpn \ diff --git a/speedtestc/Makefile b/speedtestc/Makefile index 890aa0fd5..531ce4428 100644 --- a/speedtestc/Makefile +++ b/speedtestc/Makefile @@ -8,11 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=speedtestc -PKG_RELEASE:=1 +PKG_RELEASE:=2 -PKG_SOURCE_URL:=https://github.com/mobrembski/SpeedTestC.git +#PKG_SOURCE_URL:=https://github.com/mobrembski/SpeedTestC.git +PKG_SOURCE_URL:=https://github.com/egliu/SpeedTestC.git PKG_SOURCE_PROTO:=git -PKG_SOURCE_VERSION:=56482555e34f7f4002b116efd63cfa68634d389f +#PKG_SOURCE_VERSION:=56482555e34f7f4002b116efd63cfa68634d389f +PKG_SOURCE_VERSION:=f7623914afabda582f146caab1081e601a34e882 PKG_MAINTAINER:=Ycarus (Yannick Chabanois) PKG_LICENSE:=GPL-2.0 diff --git a/speedtestc/patches/compile-fix.patch b/speedtestc/patches/compile-fix.patch new file mode 100644 index 000000000..859866bf1 --- /dev/null +++ b/speedtestc/patches/compile-fix.patch @@ -0,0 +1,81 @@ +diff --git a/src/SpeedtestConfig.c b/SpeedTestC/src/SpeedtestConfig.c +index 7b60a59..d9f58c9 100644 +--- a/src/SpeedtestConfig.c ++++ b/src/SpeedtestConfig.c +@@ -50,7 +50,7 @@ static void parseClient(const char *configline, SPEEDTESTCONFIG_T **result_p) + char lat[16] = {0}; + char lon[16] = {0}; + +- if(sscanf(configline,"%*[^\"]\"%15[^\"]\"%*[^\"]\"%15[^\"]\"%*[^\"]\"%15[^\"]\"%*[^\"]\"%255[^\"]\"", ++ if(sscanf(configline,"%*[^\"]\"%15[^\"]\"%*[^\"]\"%20[^\"]\"%*[^\"]\"%20[^\"]\"%*[^\"]\"%255[^\"]\"", + result->ip, lat, lon, result->isp)!=4) + { + fprintf(stderr,"Cannot parse all fields! Config line: %s", configline); +diff --git a/src/SpeedtestDownloadTest.c b/src/SpeedtestDownloadTest.c +index 54ed45d..545582a 100644 +--- a/src/SpeedtestDownloadTest.c ++++ b/src/SpeedtestDownloadTest.c +@@ -32,7 +32,7 @@ static void *__downloadThread(void *arg) + return NULL; + } + +-void testDownload(const char *url) ++void testDownload(char *url) + { + size_t numOfThreads = speedTestConfig->downloadThreadConfig.count * + speedTestConfig->downloadThreadConfig.sizeLength; +diff --git a/src/SpeedtestDownloadTest.h b/src/SpeedtestDownloadTest.h +index e341f31..45e9d9a 100644 +--- a/src/SpeedtestDownloadTest.h ++++ b/src/SpeedtestDownloadTest.h +@@ -1,6 +1,6 @@ + #ifndef _SPEEDTEST_DOWNLOAD_TEST_ + #define _SPEEDTEST_DOWNLOAD_TEST_ + +-void testDownload(const char *url); ++void testDownload(char *url); + + #endif +diff --git a/src/SpeedtestServers.c b/src/SpeedtestServers.c +index 5456f69..e3ca9b4 100644 +--- a/src/SpeedtestServers.c ++++ b/src/SpeedtestServers.c +@@ -106,9 +106,9 @@ SPEEDTESTSERVER_T **getServers(int *serverCount, char *ignoreServers, float lat, + "http://c.speedtest.net/speedtest-servers-static.php", + "http://www.speedtest.net/speedtest-servers.php", + "http://c.speedtest.net/speedtest-servers.php"}; +- const u_int32_t urlsCount = 4; +- u_int32_t count = 0; +- u_int32_t reallocCount = 0; ++ const __int32_t urlsCount = 4; ++ __int32_t count = 0; ++ __int32_t reallocCount = 0; + + /* malloc the size as the macro SERVER_SIZE defines */ + list = (SPEEDTESTSERVER_T**)calloc(SERVER_SIZE, sizeof(SPEEDTESTSERVER_T**)); +diff --git a/src/SpeedtestUploadTest.c b/src/SpeedtestUploadTest.c +index b0414df..5804af6 100644 +--- a/src/SpeedtestUploadTest.c ++++ b/src/SpeedtestUploadTest.c +@@ -24,7 +24,7 @@ static void *__uploadThread(void *arg) + { + /* Testing upload... */ + THREADARGS_T *threadConfig = (THREADARGS_T *)arg; +- int i, size, sockId; ++ int size, sockId; + unsigned long totalTransfered = 0; + char uploadUrl[1024]; + +diff --git a/src/http.c b/src/http.c +index 7ace0e1..4c03205 100644 +--- a/src/http.c ++++ b/src/http.c +@@ -112,7 +112,7 @@ int httpGet(char* pAddress, int pPort, char* pRequest) + + } + +- if(!success == 1) ++ if((!success) == 1) + { + close(sockId); + return 0;