1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-02-13 11:01:50 +00:00
openmptcprouter-feeds/speedtestc/patches/compile-fix.patch
Ycarus (Yannick Chabanois) 71036a4af5 Update speedtestc patches
2019-08-22 09:02:27 +02:00

38 lines
1.4 KiB
Diff

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