Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
N
noVNC
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
rasky
noVNC
Commits
9b75bcaa
Commit
9b75bcaa
authored
Jan 31, 2012
by
Mike Tinglof
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add tight zlib stream reset; add error if tight encoding is used w/o true color
parent
a14b8fae
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
rfb.js
include/rfb.js
+12
-3
No files found.
include/rfb.js
View file @
9b75bcaa
...
@@ -1276,6 +1276,11 @@ encHandlers.HEXTILE = function display_hextile() {
...
@@ -1276,6 +1276,11 @@ encHandlers.HEXTILE = function display_hextile() {
encHandlers
.
TIGHT
=
function
display_tight
()
{
encHandlers
.
TIGHT
=
function
display_tight
()
{
Util
.
Debug
(
">> display_tight"
);
Util
.
Debug
(
">> display_tight"
);
if
(
fb_depth
==
1
)
{
fail
(
"Tight protocol handler only implements true color mode"
);
}
var
ctl
,
cmode
,
clength
,
getCLength
,
color
,
img
,
data
;
var
ctl
,
cmode
,
clength
,
getCLength
,
color
,
img
,
data
;
var
filterId
=
-
1
,
resetStreams
=
0
,
streamId
=
-
1
;
var
filterId
=
-
1
,
resetStreams
=
0
,
streamId
=
-
1
;
var
rQ
=
ws
.
get_rQ
(),
rQi
=
ws
.
get_rQi
();
var
rQ
=
ws
.
get_rQ
(),
rQi
=
ws
.
get_rQi
();
...
@@ -1308,10 +1313,15 @@ encHandlers.TIGHT = function display_tight() {
...
@@ -1308,10 +1313,15 @@ encHandlers.TIGHT = function display_tight() {
}
}
var
decompress
=
function
(
data
)
{
var
decompress
=
function
(
data
)
{
// TODO: process resetStreams here
for
(
var
i
=
0
;
i
<
4
;
i
++
)
{
if
((
resetStreams
>>
i
)
&
1
)
{
FBU
.
zlibs
[
i
].
reset
();
Util
.
Info
(
"Reset zlib stream "
+
i
);
}
}
var
uncompressed
=
FBU
.
zlibs
[
streamId
].
uncompress
(
data
,
0
);
var
uncompressed
=
FBU
.
zlibs
[
streamId
].
uncompress
(
data
,
0
);
if
(
uncompressed
.
status
!==
0
)
if
(
uncompressed
.
status
!==
0
)
throw
(
"Invalid data in zlib stream"
);
Util
.
Error
(
"Invalid data in zlib stream"
);
//Util.Warn("Decompressed " + data.length + " to " + uncompressed.data.length + " checksums " +
//Util.Warn("Decompressed " + data.length + " to " + uncompressed.data.length + " checksums " +
// checksum(data) + ":" + checksum(uncompressed.data));
// checksum(data) + ":" + checksum(uncompressed.data));
...
@@ -1427,7 +1437,6 @@ encHandlers.TIGHT = function display_tight() {
...
@@ -1427,7 +1437,6 @@ encHandlers.TIGHT = function display_tight() {
// Keep tight reset bits
// Keep tight reset bits
resetStreams
=
ctl
&
0xF
;
resetStreams
=
ctl
&
0xF
;
if
(
resetStreams
)
throw
(
"Tight reset"
);
// Figure out filter
// Figure out filter
ctl
=
ctl
>>
4
;
ctl
=
ctl
>>
4
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment