summaryrefslogtreecommitdiff
path: root/vnc_lite.html
diff options
context:
space:
mode:
authorSamuel Mannehed <samuel@cendio.se>2017-11-11 01:48:47 +0100
committerSamuel Mannehed <samuel@cendio.se>2017-11-14 15:36:12 +0100
commitd472f3f19ef8cb9000ccfdf854d9f40e587fac0a (patch)
tree5b228b6911897efe7482716a627500470e79a5d1 /vnc_lite.html
parentee5cae9fee484794211d89de55e9d454abd4d599 (diff)
downloadnovnc-d472f3f19ef8cb9000ccfdf854d9f40e587fac0a.tar.gz
Abstract RFB errors to avoid sending strings
The API allowed strings to be passed from the RFB module to the application using the disconnect reason. This caused problems since the application didn't have control over translations for these strings. Most of the information being passed using this string was very technical and not helpful to the end user. One exception to this was the security result information regarding for example authentication failures. The protocol allows the VNC server to pass a string directly to the user in the security result. So the disconnect reason is replaced by a boolean saying if the disconnection was clean or not. And for the security result information from the server, a new event has been added.
Diffstat (limited to 'vnc_lite.html')
-rw-r--r--vnc_lite.html6
1 files changed, 3 insertions, 3 deletions
diff --git a/vnc_lite.html b/vnc_lite.html
index b904b4a..762da01 100644
--- a/vnc_lite.html
+++ b/vnc_lite.html
@@ -162,10 +162,10 @@
function disconnected(e) {
document.getElementById('sendCtrlAltDelButton').disabled = true;
updatePowerButtons();
- if (typeof(e.detail.reason) !== 'undefined') {
- status(e.detail.reason, "error");
- } else {
+ if (e.detail.clean) {
status("Disconnected", "normal");
+ } else {
+ status("Something went wrong, connection is closed", "error");
}
}