mirror of
https://github.com/syncthing/syncthing-android.git
synced 2024-11-23 04:41:16 +00:00
Merge pull request #496 from brianhlin/master
Check if using discovery servers (#488)
This commit is contained in:
commit
ecbce403ff
1 changed files with 7 additions and 2 deletions
|
@ -440,9 +440,14 @@ public class RestApi implements SyncthingService.OnWebGuiAvailableListener,
|
|||
SystemInfo si = new SystemInfo();
|
||||
si.alloc = system.getLong("alloc");
|
||||
si.cpuPercent = system.getDouble("cpuPercent");
|
||||
si.extAnnounceTotal = system.getInt("discoveryMethods");
|
||||
si.extAnnounceConnected =
|
||||
if (system.has("discoveryEnabled")) {
|
||||
si.extAnnounceTotal = system.getInt("discoveryMethods");
|
||||
si.extAnnounceConnected =
|
||||
si.extAnnounceTotal - system.getJSONObject("discoveryErrors").length();
|
||||
} else {
|
||||
si.extAnnounceTotal = 0;
|
||||
si.extAnnounceConnected = 0;
|
||||
}
|
||||
si.goroutines = system.getInt("goroutines");
|
||||
si.myID = system.getString("myID");
|
||||
si.sys = system.getLong("sys");
|
||||
|
|
Loading…
Reference in a new issue