summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkali kaneko (leap communications) <kali@leap.se>2021-02-08 20:34:42 +0100
committerkali kaneko (leap communications) <kali@leap.se>2021-02-08 23:32:22 +0100
commit7af4d63ea872609a9d7c2f9d954a211bded1b5bb (patch)
tree549723cd55aa1a90813a08a6e0435829daa4378a
parent69f1304f51371b246da6ecf1abc8c6703fbfebf9 (diff)
[style] cleanup
- remove unused debug - uncomment notification function, leftover from debug - comment about go-land mutexes
-rw-r--r--gui/qml/main.qml2
-rw-r--r--pkg/backend/status.go9
2 files changed, 4 insertions, 7 deletions
diff --git a/gui/qml/main.qml b/gui/qml/main.qml
index 4189e27..3ddf8d3 100644
--- a/gui/qml/main.qml
+++ b/gui/qml/main.qml
@@ -181,14 +181,12 @@ ApplicationWindow {
// Helper to show notification messages
function showNotification(msg) {
console.log("Going to show notification message: ", msg);
- /*
if (supportsMessages) {
let appname = ctx ? ctx.appName: "VPN";
showMessage(appname, msg, null, 15000);
} else {
console.log("System doesn't support systray notifications");
}
- */
}
menu: Menu {
diff --git a/pkg/backend/status.go b/pkg/backend/status.go
index f793e2f..16db227 100644
--- a/pkg/backend/status.go
+++ b/pkg/backend/status.go
@@ -5,7 +5,6 @@ import (
"encoding/json"
"log"
"sync"
- "fmt" // DEBUG
"0xacab.org/leap/bitmask-vpn/pkg/bitmask"
"0xacab.org/leap/bitmask-vpn/pkg/config"
@@ -19,13 +18,14 @@ const (
failedStr = "failed"
)
-var statusMutex sync.Mutex
-var updateMutex sync.Mutex
-
// ctx will be our glorious global object.
// if we ever switch again to a provider-agnostic app, we should keep a map here.
var ctx *connectionCtx
+// these mutexes protect setting and updating the global status in this go backend
+var statusMutex sync.Mutex
+var updateMutex sync.Mutex
+
// The connectionCtx keeps the global state that is passed around to C-land. It
// also serves as the primary way of passing requests from the frontend to the
// Go-core, by letting the UI write some of these variables and processing
@@ -57,7 +57,6 @@ func (c connectionCtx) toJson() ([]byte, error) {
log.Println(err)
return nil, err
}
- fmt.Println(">>> ctx toJson done")
return b, nil
}