Closed gglluukk closed 7 months ago
Can confirm fix works on Ubuntu 22.04
Works for me on Debian GNU/Linux 12 (bookworm)
Works for me as well on Fedora 39
Can confirm on arch
Hi,
New here, how do I fix this with the code? Is there instructions to do that, apologies not too much familiar with GitHub or linux.
Hi,
New here, how do I fix this with the code? Is there instructions to do that, apologies not too much familiar with GitHub or linux.
inside the directory for SpeedTest, run git pull https://github.com/gglluukk/SpeedTest
and then recompile as shown in the readme (the cmake and make command)
Hi,
New here, how do I fix this with the code? Is there instructions to do that, apologies not too much familiar with GitHub or linux.
gh pr checkout 61
then the same install again
There's some extraneous quotes around the IP and ISP when printing the values. I'm not sure if that's due to the explicit casting to strings or if the JSON library you used does something weird?
It's not a problem for textual outputs obviously but completely breaks JSON output because that is a simple string concatenation in main.cpp
(actual values replaced, obviously):
{"client":{"ip":""x.x.x.x"","lat":"00.0000","lon":"00.0000","isp":""Deutsche Telekom AG""},"servers_online":"10","server":{"name":"Strasbourg","sponsor":"bvpn.eu","distance":"222.986","latency":"23","host":"ookla.de.eu.waselpro.com:8080"},"ping":"23","jitter":"0","_":"only latency requested"}
Can be fixed with:
try {
map["ip_address"] = obj["ip"].ToString();
map["isp"] = obj["company"]["name"].ToString();
map["lat"] = obj["location"]["latitude"].dump();
map["lon"] = obj["location"]["longitude"].dump();
} catch(...) {}
Thanks for helping on this!
Fixes https://github.com/taganaka/SpeedTest/issues/60