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
7b90c447
Commit
7b90c447
authored
Jan 17, 2002
by
dscho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
correct BackChannel handling, compile cleanups
parent
ba66518f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
31 additions
and
15 deletions
+31
-15
font.c
font.c
+3
-2
rfb.h
rfb.h
+3
-0
rfbproto.h
rfbproto.h
+1
-0
rfbserver.c
rfbserver.c
+23
-12
vncauth.c
vncauth.c
+1
-1
No files found.
font.c
View file @
7b90c447
...
@@ -4,8 +4,8 @@ int rfbDrawChar(rfbScreenInfoPtr rfbScreen,rfbFontDataPtr font,
...
@@ -4,8 +4,8 @@ int rfbDrawChar(rfbScreenInfoPtr rfbScreen,rfbFontDataPtr font,
int
x
,
int
y
,
unsigned
char
c
,
Pixel
col
)
int
x
,
int
y
,
unsigned
char
c
,
Pixel
col
)
{
{
int
i
,
j
,
width
,
height
;
int
i
,
j
,
width
,
height
;
unsigned
char
d
;
unsigned
char
*
data
=
font
->
data
+
font
->
metaData
[
c
*
5
];
unsigned
char
*
data
=
font
->
data
+
font
->
metaData
[
c
*
5
];
unsigned
char
d
=*
data
;
int
rowstride
=
rfbScreen
->
paddedWidthInBytes
;
int
rowstride
=
rfbScreen
->
paddedWidthInBytes
;
int
bpp
=
rfbScreen
->
rfbServerFormat
.
bitsPerPixel
/
8
;
int
bpp
=
rfbScreen
->
rfbServerFormat
.
bitsPerPixel
/
8
;
char
*
colour
=
(
char
*
)
&
col
;
char
*
colour
=
(
char
*
)
&
col
;
...
@@ -49,8 +49,8 @@ int rfbDrawCharWithClip(rfbScreenInfoPtr rfbScreen,rfbFontDataPtr font,
...
@@ -49,8 +49,8 @@ int rfbDrawCharWithClip(rfbScreenInfoPtr rfbScreen,rfbFontDataPtr font,
Pixel
col
,
Pixel
bcol
)
Pixel
col
,
Pixel
bcol
)
{
{
int
i
,
j
,
width
,
height
;
int
i
,
j
,
width
,
height
;
unsigned
char
d
;
unsigned
char
*
data
=
font
->
data
+
font
->
metaData
[
c
*
5
];
unsigned
char
*
data
=
font
->
data
+
font
->
metaData
[
c
*
5
];
unsigned
char
d
;
int
rowstride
=
rfbScreen
->
paddedWidthInBytes
;
int
rowstride
=
rfbScreen
->
paddedWidthInBytes
;
int
bpp
=
rfbScreen
->
rfbServerFormat
.
bitsPerPixel
/
8
,
extra_bytes
=
0
;
int
bpp
=
rfbScreen
->
rfbServerFormat
.
bitsPerPixel
/
8
,
extra_bytes
=
0
;
char
*
colour
=
(
char
*
)
&
col
;
char
*
colour
=
(
char
*
)
&
col
;
...
@@ -73,6 +73,7 @@ int rfbDrawCharWithClip(rfbScreenInfoPtr rfbScreen,rfbFontDataPtr font,
...
@@ -73,6 +73,7 @@ int rfbDrawCharWithClip(rfbScreenInfoPtr rfbScreen,rfbFontDataPtr font,
if
(
y2
<
y
+
height
)
height
-=
y
+
height
-
y2
;
if
(
y2
<
y
+
height
)
height
-=
y
+
height
-
y2
;
if
(
x2
<
x
+
width
)
{
extra_bytes
+=
(
x1
+
width
)
/
8
-
(
x
+
width
-
x2
+
7
)
/
8
;
width
-=
x
+
width
-
x2
;
}
if
(
x2
<
x
+
width
)
{
extra_bytes
+=
(
x1
+
width
)
/
8
-
(
x
+
width
-
x2
+
7
)
/
8
;
width
-=
x
+
width
-
x2
;
}
d
=*
data
;
for
(
j
=
y1
;
j
<
height
;
j
++
)
{
for
(
j
=
y1
;
j
<
height
;
j
++
)
{
if
((
x1
&
7
)
!=
0
)
if
((
x1
&
7
)
!=
0
)
d
=
data
[
-
1
];
/* TODO: check if in this case extra_bytes is correct! */
d
=
data
[
-
1
];
/* TODO: check if in this case extra_bytes is correct! */
...
...
rfb.h
View file @
7b90c447
...
@@ -473,6 +473,9 @@ typedef struct rfbClientRec {
...
@@ -473,6 +473,9 @@ typedef struct rfbClientRec {
Bool
enableCursorShapeUpdates
;
/* client supports cursor shape updates */
Bool
enableCursorShapeUpdates
;
/* client supports cursor shape updates */
Bool
useRichCursorEncoding
;
/* rfbEncodingRichCursor is preferred */
Bool
useRichCursorEncoding
;
/* rfbEncodingRichCursor is preferred */
Bool
cursorWasChanged
;
/* cursor shape update should be sent */
Bool
cursorWasChanged
;
/* cursor shape update should be sent */
#ifdef BACKCHANNEL
Bool
enableBackChannel
;
#endif
struct
rfbClientRec
*
prev
;
struct
rfbClientRec
*
prev
;
struct
rfbClientRec
*
next
;
struct
rfbClientRec
*
next
;
...
...
rfbproto.h
View file @
7b90c447
...
@@ -610,6 +610,7 @@ typedef struct {
...
@@ -610,6 +610,7 @@ typedef struct {
#ifdef BACKCHANNEL
#ifdef BACKCHANNEL
typedef
rfbServerCutTextMsg
rfbBackChannelMsg
;
typedef
rfbServerCutTextMsg
rfbBackChannelMsg
;
#define sz_rfbBackChannelMsg 8
#endif
#endif
...
...
rfbserver.c
View file @
7b90c447
...
@@ -709,6 +709,15 @@ rfbProcessClientNormalMessage(cl)
...
@@ -709,6 +709,15 @@ rfbProcessClientNormalMessage(cl)
cl
->
enableLastRectEncoding
=
TRUE
;
cl
->
enableLastRectEncoding
=
TRUE
;
}
}
break
;
break
;
#ifdef BACKCHANNEL
case
rfbEncodingBackChannel
:
if
(
!
cl
->
enableBackChannel
)
{
rfbLog
(
"Enabling BackChannel protocol extension for "
"client %s
\n
"
,
cl
->
host
);
cl
->
enableBackChannel
=
TRUE
;
}
break
;
#endif
default
:
default
:
if
(
enc
>=
(
CARD32
)
rfbEncodingCompressLevel0
&&
if
(
enc
>=
(
CARD32
)
rfbEncodingCompressLevel0
&&
enc
<=
(
CARD32
)
rfbEncodingCompressLevel9
)
{
enc
<=
(
CARD32
)
rfbEncodingCompressLevel9
)
{
...
@@ -1470,18 +1479,20 @@ void rfbSendBackChannel(rfbScreenInfoPtr rfbScreen,char* str,int len)
...
@@ -1470,18 +1479,20 @@ void rfbSendBackChannel(rfbScreenInfoPtr rfbScreen,char* str,int len)
iterator
=
rfbGetClientIterator
(
rfbScreen
);
iterator
=
rfbGetClientIterator
(
rfbScreen
);
while
((
cl
=
rfbClientIteratorNext
(
iterator
))
!=
NULL
)
{
while
((
cl
=
rfbClientIteratorNext
(
iterator
))
!=
NULL
)
{
sct
.
type
=
rfbBackChannel
;
if
(
cl
->
enableBackChannel
)
{
sct
.
length
=
Swap32IfLE
(
len
);
sct
.
type
=
rfbBackChannel
;
if
(
WriteExact
(
cl
,
(
char
*
)
&
sct
,
sct
.
length
=
Swap32IfLE
(
len
);
sz_rfbServerCutTextMsg
)
<
0
)
{
if
(
WriteExact
(
cl
,
(
char
*
)
&
sct
,
rfbLogPerror
(
"rfbSendServerCutText: write"
);
sz_rfbBackChannelMsg
)
<
0
)
{
rfbCloseClient
(
cl
);
rfbLogPerror
(
"rfbSendBackChannel: write"
);
continue
;
rfbCloseClient
(
cl
);
}
continue
;
if
(
WriteExact
(
cl
,
str
,
len
)
<
0
)
{
}
rfbLogPerror
(
"rfbSendServerCutText: write"
);
if
(
WriteExact
(
cl
,
str
,
len
)
<
0
)
{
rfbCloseClient
(
cl
);
rfbLogPerror
(
"rfbSendBackChannel: write"
);
}
rfbCloseClient
(
cl
);
}
}
}
}
rfbReleaseClientIterator
(
iterator
);
rfbReleaseClientIterator
(
iterator
);
}
}
...
...
vncauth.c
View file @
7b90c447
...
@@ -26,8 +26,8 @@
...
@@ -26,8 +26,8 @@
#include <string.h>
#include <string.h>
#include <sys/types.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/stat.h>
#ifdef WIN32
#include <time.h>
#include <time.h>
#ifdef WIN32
#define srandom srand
#define srandom srand
#define random rand
#define random rand
#else
#else
...
...
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