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
131ede28
Commit
131ede28
authored
Jun 13, 2002
by
dscho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pthread fix
parent
af41bea6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
9 deletions
+21
-9
main.c
main.c
+1
-0
rfbserver.c
rfbserver.c
+8
-3
sockets.c
sockets.c
+12
-6
No files found.
main.c
View file @
131ede28
...
...
@@ -328,6 +328,7 @@ listenerRun(void *data)
if
(
cl
&&
!
cl
->
onHold
)
rfbStartOnHoldClient
(
cl
);
}
return
(
NULL
);
}
void
...
...
rfbserver.c
View file @
131ede28
...
...
@@ -448,9 +448,14 @@ rfbProcessClientProtocolVersion(cl)
pv
[
sz_rfbProtocolVersionMsg
]
=
0
;
if
(
sscanf
(
pv
,
rfbProtocolVersionFormat
,
&
major_
,
&
minor_
)
!=
2
)
{
rfbLog
(
"rfbProcessClientProtocolVersion: not a valid RFB client
\n
"
);
rfbCloseClient
(
cl
);
return
;
char
name
[
1024
];
if
(
sscanf
(
pv
,
"RFB %03d.%03d %1024s
\n
"
,
&
major_
,
&
minor_
,
name
)
!=
3
)
{
rfbLog
(
"rfbProcessClientProtocolVersion: not a valid RFB client
\n
"
);
rfbCloseClient
(
cl
);
return
;
}
free
(
cl
->
host
);
cl
->
host
=
strdup
(
name
);
}
rfbLog
(
"Protocol version %d.%d
\n
"
,
major_
,
minor_
);
...
...
sockets.c
View file @
131ede28
...
...
@@ -309,12 +309,18 @@ rfbCloseClient(cl)
rfbClientPtr
cl
;
{
LOCK
(
cl
->
updateMutex
);
if
(
cl
->
sock
!=
-
1
)
{
FD_CLR
(
cl
->
sock
,
&
(
cl
->
screen
->
allFds
));
shutdown
(
cl
->
sock
,
SHUT_RDWR
);
close
(
cl
->
sock
);
cl
->
sock
=
-
1
;
}
#ifdef HAVE_PTHREADS
if
(
cl
->
sock
!=
-
1
)
#endif
{
FD_CLR
(
cl
->
sock
,
&
(
cl
->
screen
->
allFds
));
if
(
cl
->
sock
==
cl
->
screen
->
maxFd
)
while
(
!
FD_ISSET
(
cl
->
screen
->
maxFd
,
&
(
cl
->
screen
->
allFds
)))
cl
->
screen
->
maxFd
--
;
shutdown
(
cl
->
sock
,
SHUT_RDWR
);
close
(
cl
->
sock
);
cl
->
sock
=
-
1
;
}
TSIGNAL
(
cl
->
updateCond
);
UNLOCK
(
cl
->
updateMutex
);
}
...
...
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