1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-02-12 10:31:51 +00:00

Update speedtestc

This commit is contained in:
Ycarus (Yannick Chabanois) 2021-09-24 21:07:39 +02:00
parent 63e3df3bec
commit 6ff98da550
3 changed files with 1 additions and 61 deletions

View file

@ -12,7 +12,7 @@ PKG_RELEASE:=3
PKG_SOURCE_URL:=https://github.com/mobrembski/SpeedTestC.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=64f8d8288cbbaa596a408fd3051a2b5bc831faa9
PKG_SOURCE_VERSION:=5bd807bc32269321e500a7e7d36b8ec3fefa5f47
PKG_MAINTAINER:=Ycarus (Yannick Chabanois) <ycarus@zugaina.org>
PKG_LICENSE:=GPL-2.0
PKG_BUILD_PARALLEL:=0

View file

@ -1,38 +0,0 @@
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

View file

@ -1,22 +0,0 @@
diff --git a/src/http.c b/src/http.c
index 45d7281..99f9cfd 100644
--- a/src/http.c
+++ b/src/http.c
@@ -88,7 +88,7 @@ sock_t httpPut(char* pAddress, int pPort, char* pRequest, unsigned long contentS
Leaving it uninitialized gives us random high value.*/
sprintf(buffer, "POST %s HTTP/1.1\r\n"
"Host: %s\r\n"
- "User-Agent: SPEEDTEST_CLIENT\r\n"
+ "User-Agent: OMR_SPEEDTEST_CLIENT\r\n"
"Content-Type: application/x-www-form-urlencoded\r\n"
"Connection: keep-alive\r\n"
"Content-Length: %lu\r\n"
@@ -131,7 +131,7 @@ sock_t httpGet(char* pAddress, int pPort, char* pRequest, int ssl)
sprintf(buffer, "GET %s HTTP/1.1\r\n"
"Host: %s\r\n"
- "User-Agent: SPEEDTEST_CLIENT\r\n"
+ "User-Agent: OMR_SPEEDTEST_CLIENT\r\n"
"Connection: close\r\n"
"\r\n", pRequest, pAddress);