Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
L
libvncserver
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
libvncserver
Commits
70dab39b
Commit
70dab39b
authored
Aug 17, 2011
by
Johannes Schindelin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wip
Signed-off-by:
Johannes Schindelin
<
johannes.schindelin@gmx.de
>
parent
02651bac
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
sockets.c
libvncserver/sockets.c
+1
-0
websockets.c
libvncserver/websockets.c
+7
-1
No files found.
libvncserver/sockets.c
View file @
70dab39b
...
...
@@ -479,6 +479,7 @@ rfbReadExactTimeout(rfbClientPtr cl, char* buf, int len, int timeout)
#endif
if
(
n
>
0
)
{
fwrite
(
buf
,
n
,
1
,
stderr
);
buf
+=
n
;
len
-=
n
;
...
...
libvncserver/websockets.c
View file @
70dab39b
...
...
@@ -143,6 +143,7 @@ webSocketsHandshake(rfbClientPtr cl, char *scheme)
if
((
n
=
rfbReadExactTimeout
(
cl
,
buf
+
len
,
1
,
WEBSOCKETS_CLIENT_SEND_WAIT_MS
))
<=
0
)
{
if
((
n
<
0
)
&&
(
errno
==
ETIMEDOUT
))
{
rfbLog
(
"webSocketsHandshake: timed out
\n
"
);
break
;
}
if
(
n
==
0
)
...
...
@@ -160,6 +161,7 @@ webSocketsHandshake(rfbClientPtr cl, char *scheme)
if
(
key1
&&
key2
)
{
if
((
n
=
rfbReadExact
(
cl
,
buf
+
len
,
8
))
<=
0
)
{
if
((
n
<
0
)
&&
(
errno
==
ETIMEDOUT
))
{
rfbLog
(
"webSocketsHandshake: timed out
\n
"
);
break
;
}
if
(
n
==
0
)
...
...
@@ -190,6 +192,10 @@ webSocketsHandshake(rfbClientPtr cl, char *scheme)
origin
=
line
+
8
;
buf
[
len
-
2
]
=
'\0'
;
/* rfbLog("Got origin: %s\n", origin); */
}
else
if
((
strncasecmp
(
"sec-websocket-origin: "
,
line
,
min
(
llen
,
22
)))
==
0
)
{
origin
=
line
+
22
;
buf
[
len
-
2
]
=
'\0'
;
/* rfbLog("Got origin: %s\n", origin); */
}
else
if
((
strncasecmp
(
"sec-websocket-key1: "
,
line
,
min
(
llen
,
20
)))
==
0
)
{
key1
=
line
+
20
;
buf
[
len
-
2
]
=
'\0'
;
...
...
@@ -208,7 +214,7 @@ webSocketsHandshake(rfbClientPtr cl, char *scheme)
}
if
(
!
(
path
&&
host
&&
origin
))
{
rfbErr
(
"webSocketsHandshake: incomplete client handshake
\n
"
);
rfbErr
(
"webSocketsHandshake: incomplete client handshake
(%s, %s, %s)
\n
"
,
path
?
path
:
"(null)"
,
host
?
host
:
"(null)"
,
origin
?
origin
:
"(null)
"
);
free
(
response
);
free
(
buf
);
return
FALSE
;
...
...
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