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
1f5f1679
Commit
1f5f1679
authored
Jan 18, 2015
by
Christian Beier
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #57 from maxnet/master
Fix handling of multiple VNC commands per websockets frame
parents
b568db93
6836ccb2
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
0 deletions
+30
-0
main.c
libvncserver/main.c
+8
-0
sockets.c
libvncserver/sockets.c
+8
-0
websockets.c
libvncserver/websockets.c
+13
-0
rfb.h
rfb/rfb.h
+1
-0
No files found.
libvncserver/main.c
View file @
1f5f1679
...
...
@@ -550,7 +550,15 @@ clientInput(void *data)
rfbSendFileTransferChunk
(
cl
);
if
(
FD_ISSET
(
cl
->
sock
,
&
rfds
)
||
FD_ISSET
(
cl
->
sock
,
&
efds
))
{
#ifdef LIBVNCSERVER_WITH_WEBSOCKETS
do
{
rfbProcessClientMessage
(
cl
);
}
while
(
webSocketsHasDataInBuffer
(
cl
));
#else
rfbProcessClientMessage
(
cl
);
#endif
}
}
/* Get rid of the output thread. */
...
...
libvncserver/sockets.c
View file @
1f5f1679
...
...
@@ -391,7 +391,15 @@ rfbCheckFds(rfbScreenInfoPtr rfbScreen,long usec)
if
(
FD_ISSET
(
cl
->
sock
,
&
(
rfbScreen
->
allFds
)))
{
if
(
FD_ISSET
(
cl
->
sock
,
&
fds
))
{
#ifdef LIBVNCSERVER_WITH_WEBSOCKETS
do
{
rfbProcessClientMessage
(
cl
);
}
while
(
webSocketsHasDataInBuffer
(
cl
));
#else
rfbProcessClientMessage
(
cl
);
#endif
}
else
rfbSendFileTransferChunk
(
cl
);
}
...
...
libvncserver/websockets.c
View file @
1f5f1679
...
...
@@ -905,3 +905,16 @@ webSocketCheckDisconnect(rfbClientPtr cl)
return
FALSE
;
}
/* returns TRUE if there is data waiting to be read in our internal buffer
* or if is there any pending data in the buffer of the SSL implementation
*/
rfbBool
webSocketsHasDataInBuffer
(
rfbClientPtr
cl
)
{
ws_ctx_t
*
wsctx
=
(
ws_ctx_t
*
)
cl
->
wsctx
;
if
(
wsctx
&&
wsctx
->
readbuflen
)
return
TRUE
;
return
(
cl
->
sslctx
&&
rfbssl_pending
(
cl
)
>
0
);
}
rfb/rfb.h
View file @
1f5f1679
...
...
@@ -765,6 +765,7 @@ extern rfbBool webSocketsCheck(rfbClientPtr cl);
extern
rfbBool
webSocketCheckDisconnect
(
rfbClientPtr
cl
);
extern
int
webSocketsEncode
(
rfbClientPtr
cl
,
const
char
*
src
,
int
len
,
char
**
dst
);
extern
int
webSocketsDecode
(
rfbClientPtr
cl
,
char
*
dst
,
int
len
);
extern
rfbBool
webSocketsHasDataInBuffer
(
rfbClientPtr
cl
);
#endif
/* rfbserver.c */
...
...
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