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
0b7a0030
Commit
0b7a0030
authored
Jan 10, 2006
by
dscho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rfbProcessEvents() has to iterate also over clients with sock < 0 to close them
parent
71f2ec79
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
3 deletions
+24
-3
ChangeLog
ChangeLog
+5
-0
main.c
libvncserver/main.c
+3
-1
rfbserver.c
libvncserver/rfbserver.c
+16
-2
No files found.
ChangeLog
View file @
0b7a0030
2006-01-10 Johannes E. Schindelin <Johannes.Schindelin@gmx.de>
* libvncserver/{main.c,rfbserver.c}: fix timely closing of clients;
the client iterator in rfbProcessEvents() has to iterate also
over clients whose sock < 0. Noticed by Karl.
2006-01-08 Karl Runge <runge@karlrunge.com>
* x11vnc: the big split. (and -afteraccept and -passwdfile read:..)
* examples/pnmshow24.c: fix typo.
...
...
libvncserver/main.c
View file @
0b7a0030
...
...
@@ -904,6 +904,8 @@ rfbProcessEvents(rfbScreenInfoPtr screen,long usec)
rfbClientPtr
cl
,
clPrev
;
struct
timeval
tv
;
rfbBool
result
=
FALSE
;
extern
rfbClientIteratorPtr
rfbGetClientIteratorWithClosed
(
rfbScreenInfoPtr
rfbScreen
);
if
(
usec
<
0
)
usec
=
screen
->
deferUpdateTime
*
1000
;
...
...
@@ -914,7 +916,7 @@ rfbProcessEvents(rfbScreenInfoPtr screen,long usec)
corbaCheckFds
(
screen
);
#endif
i
=
rfbGetClientIterator
(
screen
);
i
=
rfbGetClientIterator
WithClosed
(
screen
);
cl
=
rfbClientIteratorHead
(
i
);
while
(
cl
)
{
if
(
cl
->
sock
>=
0
&&
!
cl
->
onHold
&&
FB_UPDATE_PENDING
(
cl
)
&&
...
...
libvncserver/rfbserver.c
View file @
0b7a0030
...
...
@@ -98,6 +98,7 @@ static MUTEX(rfbClientListMutex);
struct
rfbClientIterator
{
rfbClientPtr
next
;
rfbScreenInfoPtr
screen
;
rfbBool
closedToo
;
};
void
...
...
@@ -120,6 +121,18 @@ rfbGetClientIterator(rfbScreenInfoPtr rfbScreen)
(
rfbClientIteratorPtr
)
malloc
(
sizeof
(
struct
rfbClientIterator
));
i
->
next
=
NULL
;
i
->
screen
=
rfbScreen
;
i
->
closedToo
=
FALSE
;
return
i
;
}
rfbClientIteratorPtr
rfbGetClientIteratorWithClosed
(
rfbScreenInfoPtr
rfbScreen
)
{
rfbClientIteratorPtr
i
=
(
rfbClientIteratorPtr
)
malloc
(
sizeof
(
struct
rfbClientIterator
));
i
->
next
=
NULL
;
i
->
screen
=
rfbScreen
;
i
->
closedToo
=
TRUE
;
return
i
;
}
...
...
@@ -152,6 +165,7 @@ rfbClientIteratorNext(rfbClientIteratorPtr i)
}
#ifdef LIBVNCSERVER_HAVE_LIBPTHREAD
if
(
!
i
->
closedToo
)
while
(
i
->
next
&&
i
->
next
->
sock
<
0
)
i
->
next
=
i
->
next
->
next
;
if
(
i
->
next
)
...
...
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