Skip to content
Snippets Groups Projects
Verified Commit c2db7c96 authored by Pier Angelo Vendrame's avatar Pier Angelo Vendrame :jack_o_lantern:
Browse files

fixup! Add Tor integration and UI

Bug 42479: Improve TorConnect error handling

Updated the prototype of onBootstrapError.
parent 4a8875f4
Branches
Tags
1 merge request!78Bug 42479: Improve TorConnect error handling
......@@ -14,7 +14,9 @@ interface TorEvents {
}
class TorError(
var message: String,
var details: String
var details: String,
var phase: String,
var reason: String,
) { }
interface TorLogs {
......
......@@ -301,8 +301,8 @@ class TorControllerGV(
}
// TorEventsBootstrapStateChangeListener
override fun onBootstrapProgress(progress: Double, status: String?, hasWarnings: Boolean) {
Log.d(TAG, "onBootstrapProgress($progress, $status, $hasWarnings)")
override fun onBootstrapProgress(progress: Double, hasWarnings: Boolean) {
Log.d(TAG, "onBootstrapProgress($progress, $hasWarnings)")
if (progress == 100.0) {
lastKnownStatus = TorConnectState.Bootstrapped
wasTorBootstrapped = true
......@@ -312,7 +312,7 @@ class TorControllerGV(
onTorConnecting()
}
onTorStatusUpdate(status, lastKnownStatus.toTorStatus().status, progress)
onTorStatusUpdate("", lastKnownStatus.toTorStatus().status, progress)
}
// TorEventsBootstrapStateChangeListener
......@@ -322,8 +322,8 @@ class TorControllerGV(
}
// TorEventsBootstrapStateChangeListener
override fun onBootstrapError(message: String?, details: String?) {
lastKnownError = TorError(message ?: "", details ?: "")
override fun onBootstrapError(code: String?, message: String?, phase: String?, reason: String?) {
lastKnownError = TorError(code ?: "", message ?: "", phase ?: "", reason ?: "")
onBootstrapStateChange(TorConnectState.Error.state)
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment