From 71036a4af5d53864c55dd84b01a383cbd7b1dd31 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Thu, 22 Aug 2019 09:02:27 +0200 Subject: [PATCH] Update speedtestc patches --- speedtestc/patches/compile-fix.patch | 38 ++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 speedtestc/patches/compile-fix.patch diff --git a/speedtestc/patches/compile-fix.patch b/speedtestc/patches/compile-fix.patch new file mode 100644 index 000000000..689e433a9 --- /dev/null +++ b/speedtestc/patches/compile-fix.patch @@ -0,0 +1,38 @@ +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