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
d3bb5fb6
Commit
d3bb5fb6
authored
Feb 10, 2003
by
dscho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed a bug that prevented the first connection to be closed
parent
2a48679c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
2 deletions
+21
-2
main.c
main.c
+4
-1
rfbserver.c
rfbserver.c
+17
-1
No files found.
main.c
View file @
d3bb5fb6
...
...
@@ -750,6 +750,9 @@ void gettimeofday(struct timeval* tv,char* dummy)
}
#endif
/* defined in rfbserver.c, but kind of "private" */
rfbClientPtr
rfbClientIteratorHead
(
rfbClientIteratorPtr
i
);
void
rfbProcessEvents
(
rfbScreenInfoPtr
rfbScreen
,
long
usec
)
{
...
...
@@ -767,7 +770,7 @@ rfbProcessEvents(rfbScreenInfoPtr rfbScreen,long usec)
#endif
i
=
rfbGetClientIterator
(
rfbScreen
);
cl
=
rfbClientIterator
Next
(
i
);
cl
=
rfbClientIterator
Head
(
i
);
while
(
cl
)
{
if
(
cl
->
sock
>=
0
&&
!
cl
->
onHold
&&
FB_UPDATE_PENDING
(
cl
)
&&
!
sraRgnEmpty
(
cl
->
requestedRegion
))
{
...
...
rfbserver.c
View file @
d3bb5fb6
...
...
@@ -118,6 +118,21 @@ rfbGetClientIterator(rfbScreenInfoPtr rfbScreen)
return
i
;
}
rfbClientPtr
rfbClientIteratorHead
(
rfbClientIteratorPtr
i
)
{
#ifdef HAVE_LIBPTHREAD
if
(
i
->
next
!=
0
)
{
rfbDecrClientRef
(
i
->
next
);
rfbIncrClientRef
(
i
->
screen
->
rfbClientHead
);
}
#endif
LOCK
(
rfbClientListMutex
);
i
->
next
=
i
->
screen
->
rfbClientHead
;
UNLOCK
(
rfbClientListMutex
);
return
i
->
next
;
}
rfbClientPtr
rfbClientIteratorNext
(
rfbClientIteratorPtr
i
)
{
...
...
@@ -396,7 +411,8 @@ rfbClientConnectionGone(cl)
LOCK
(
cl
->
refCountMutex
);
if
(
cl
->
refCount
)
{
UNLOCK
(
cl
->
refCountMutex
);
WAIT
(
cl
->
deleteCond
,
cl
->
refCountMutex
);
if
(
cl
->
screen
->
backgroundLoop
!=
FALSE
)
WAIT
(
cl
->
deleteCond
,
cl
->
refCountMutex
);
}
else
{
UNLOCK
(
cl
->
refCountMutex
);
}
...
...
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