mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Update speedtestc patches
This commit is contained in:
parent
0ab539cce2
commit
71036a4af5
1 changed files with 38 additions and 0 deletions
38
speedtestc/patches/compile-fix.patch
Normal file
38
speedtestc/patches/compile-fix.patch
Normal file
|
@ -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
|
Loading…
Add table
Add a link
Reference in a new issue