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
d15e3558
Commit
d15e3558
authored
Oct 06, 2005
by
dscho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kill BackChannel and CustomClientMessage: the new extension technique makes these hooks obsolete
parent
60f1770e
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
1 addition
and
143 deletions
+1
-143
configure.ac
configure.ac
+0
-7
mac.c
examples/mac.c
+0
-60
main.c
libvncserver/main.c
+0
-6
rfbserver.c
libvncserver/rfbserver.c
+0
-42
stats.c
libvncserver/stats.c
+0
-4
filetransfermsg.c
libvncserver/tightvnc-filetransfer/filetransfermsg.c
+1
-0
rfb.h
rfb/rfb.h
+0
-13
rfbproto.h
rfb/rfbproto.h
+0
-11
No files found.
configure.ac
View file @
d15e3558
...
@@ -25,13 +25,6 @@ if test "x$with_tightvnc_filetransfer" == "xyes"; then
...
@@ -25,13 +25,6 @@ if test "x$with_tightvnc_filetransfer" == "xyes"; then
AC_DEFINE(WITH_TIGHTVNC_FILETRANSFER)
AC_DEFINE(WITH_TIGHTVNC_FILETRANSFER)
fi
fi
AM_CONDITIONAL(WITH_TIGHTVNC_FILETRANSFER, test "$with_tightvnc_filetransfer" == "yes")
AM_CONDITIONAL(WITH_TIGHTVNC_FILETRANSFER, test "$with_tightvnc_filetransfer" == "yes")
AH_TEMPLATE(BACKCHANNEL, [Enable BackChannel communication])
AC_ARG_WITH(backchannel,
[ --without-backchannel disable backchannel method],
, [ with_backchannel=yes ])
if test "x$with_backchannel" = "xyes"; then
AC_DEFINE(BACKCHANNEL)
fi
AH_TEMPLATE(ALLOW24BPP, [Enable 24 bit per pixel in native framebuffer])
AH_TEMPLATE(ALLOW24BPP, [Enable 24 bit per pixel in native framebuffer])
AC_ARG_WITH(24bpp,
AC_ARG_WITH(24bpp,
[ --without-24bpp disable 24 bpp framebuffers],
[ --without-24bpp disable 24 bpp framebuffers],
...
...
examples/mac.c
View file @
d15e3558
...
@@ -27,10 +27,6 @@
...
@@ -27,10 +27,6 @@
*
*
*/
*/
#ifdef LOCAL_CONTROL
#include "1instance.c"
#endif
#include <unistd.h>
#include <unistd.h>
#include <ApplicationServices/ApplicationServices.h>
#include <ApplicationServices/ApplicationServices.h>
#include <Carbon/Carbon.h>
#include <Carbon/Carbon.h>
...
@@ -476,39 +472,11 @@ ScreenInit(int argc, char**argv)
...
@@ -476,39 +472,11 @@ ScreenInit(int argc, char**argv)
rfbInitServer
(
rfbScreen
);
rfbInitServer
(
rfbScreen
);
}
}
#ifdef LOCAL_CONTROL
single_instance_struct
single_instance
=
{
"/tmp/OSXvnc_control"
};
#endif
static
void
static
void
refreshCallback
(
CGRectCount
count
,
const
CGRect
*
rectArray
,
void
*
ignore
)
refreshCallback
(
CGRectCount
count
,
const
CGRect
*
rectArray
,
void
*
ignore
)
{
{
int
i
;
int
i
;
#ifdef LOCAL_CONTROL
char
message
[
1024
];
if
(
get_next_message
(
message
,
1024
,
&
single_instance
,
50
))
{
if
(
message
[
0
]
==
'l'
&&
message
[
1
]
==
0
)
{
rfbClientPtr
cl
;
int
i
;
for
(
i
=
0
,
cl
=
rfbScreen
->
rfbClientHead
;
cl
;
cl
=
cl
->
next
,
i
++
)
rfbLog
(
"%02d: %s
\n
"
,
i
,
cl
->
host
);
}
else
if
(
message
[
0
]
==
't'
)
{
rfbClientPtr
cl
;
for
(
cl
=
rfbScreen
->
rfbClientHead
;
cl
;
cl
=
cl
->
next
)
if
(
!
strcmp
(
message
+
1
,
cl
->
host
))
{
cl
->
clientData
=
(
void
*
)((
cl
->
clientData
==
0
)
?-
1
:
0
);
break
;
}
}
#ifdef LIBVNCSERVER_BACKCHANNEL
else
if
(
message
[
0
]
==
'b'
)
rfbSendBackChannel
(
rfbScreen
,
message
+
1
,
strlen
(
message
+
1
));
#endif
}
#endif
if
(
startTime
>
0
&&
time
(
0
)
>
startTime
+
maxSecsToConnect
)
if
(
startTime
>
0
&&
time
(
0
)
>
startTime
+
maxSecsToConnect
)
rfbShutdown
(
0
);
rfbShutdown
(
0
);
...
@@ -541,35 +509,7 @@ int main(int argc,char *argv[])
...
@@ -541,35 +509,7 @@ int main(int argc,char *argv[])
{
{
int
i
;
int
i
;
#ifdef LOCAL_CONTROL
char
message
[
1024
];
open_control_file
(
&
single_instance
);
#endif
for
(
i
=
argc
-
1
;
i
>
0
;
i
--
)
for
(
i
=
argc
-
1
;
i
>
0
;
i
--
)
#ifdef LOCAL_CONTROL
if
(
i
<
argc
-
1
&&
!
strcmp
(
argv
[
i
],
"-toggleviewonly"
))
{
if
(
strlen
(
argv
[
i
+
1
])
>
1022
)
argv
[
i
+
1
][
1022
]
=
0
;
sprintf
(
message
,
"t%s"
,
argv
[
i
+
1
]);
send_message
(
&
single_instance
,
message
);
exit
(
0
);
}
else
if
(
!
strcmp
(
argv
[
i
],
"-listclients"
))
{
rfbLog
(
"list clients
\n
"
);
send_message
(
&
single_instance
,
"l"
);
exit
(
0
);
}
else
#ifdef LIBVNCSERVER_BACKCHANNEL
if
(
i
<
argc
-
1
&&
!
strcmp
(
argv
[
i
],
"-backchannel"
))
{
if
(
strlen
(
argv
[
i
+
1
])
>
1022
)
argv
[
i
+
1
][
1022
]
=
0
;
sprintf
(
message
,
"b%s"
,
argv
[
i
+
1
]);
send_message
(
&
single_instance
,
message
);
exit
(
0
);
}
else
#endif
#endif
if
(
i
<
argc
-
1
&&
strcmp
(
argv
[
i
],
"-wait4client"
)
==
0
)
{
if
(
i
<
argc
-
1
&&
strcmp
(
argv
[
i
],
"-wait4client"
)
==
0
)
{
maxSecsToConnect
=
atoi
(
argv
[
i
+
1
])
/
1000
;
maxSecsToConnect
=
atoi
(
argv
[
i
+
1
])
/
1000
;
startTime
=
time
(
0
);
startTime
=
time
(
0
);
...
...
libvncserver/main.c
View file @
d15e3558
...
@@ -596,11 +596,6 @@ static enum rfbNewClientAction rfbDefaultNewClientHook(rfbClientPtr cl)
...
@@ -596,11 +596,6 @@ static enum rfbNewClientAction rfbDefaultNewClientHook(rfbClientPtr cl)
return
RFB_CLIENT_ACCEPT
;
return
RFB_CLIENT_ACCEPT
;
}
}
static
rfbBool
rfbDefaultProcessCustomClientMessage
(
rfbClientPtr
cl
,
uint8_t
type
)
{
return
FALSE
;
}
/*
/*
* Update server's pixel format in screenInfo structure. This
* Update server's pixel format in screenInfo structure. This
* function is called from rfbGetScreen() and rfbNewFramebuffer().
* function is called from rfbGetScreen() and rfbNewFramebuffer().
...
@@ -745,7 +740,6 @@ rfbScreenInfoPtr rfbGetScreen(int* argc,char** argv,
...
@@ -745,7 +740,6 @@ rfbScreenInfoPtr rfbGetScreen(int* argc,char** argv,
screen
->
setTranslateFunction
=
rfbSetTranslateFunction
;
screen
->
setTranslateFunction
=
rfbSetTranslateFunction
;
screen
->
newClientHook
=
rfbDefaultNewClientHook
;
screen
->
newClientHook
=
rfbDefaultNewClientHook
;
screen
->
displayHook
=
NULL
;
screen
->
displayHook
=
NULL
;
screen
->
processCustomClientMessage
=
rfbDefaultProcessCustomClientMessage
;
/* initialize client list and iterator mutex */
/* initialize client list and iterator mutex */
rfbClientListInit
(
screen
);
rfbClientListInit
(
screen
);
...
...
libvncserver/rfbserver.c
View file @
d15e3558
...
@@ -889,15 +889,6 @@ rfbProcessClientNormalMessage(rfbClientPtr cl)
...
@@ -889,15 +889,6 @@ rfbProcessClientNormalMessage(rfbClientPtr cl)
cl
->
useNewFBSize
=
TRUE
;
cl
->
useNewFBSize
=
TRUE
;
}
}
break
;
break
;
#ifdef LIBVNCSERVER_BACKCHANNEL
case
rfbEncodingBackChannel
:
if
(
!
cl
->
enableBackChannel
)
{
rfbLog
(
"Enabling BackChannel protocol extension for "
"client %s
\n
"
,
cl
->
host
);
cl
->
enableBackChannel
=
TRUE
;
}
break
;
#endif
#ifdef LIBVNCSERVER_HAVE_LIBZ
#ifdef LIBVNCSERVER_HAVE_LIBZ
case
rfbEncodingZRLE
:
case
rfbEncodingZRLE
:
if
(
cl
->
preferredEncoding
==
-
1
)
{
if
(
cl
->
preferredEncoding
==
-
1
)
{
...
@@ -1128,13 +1119,6 @@ rfbProcessClientNormalMessage(rfbClientPtr cl)
...
@@ -1128,13 +1119,6 @@ rfbProcessClientNormalMessage(rfbClientPtr cl)
e
=
next
;
e
=
next
;
}
}
if
(
cl
->
screen
->
processCustomClientMessage
(
cl
,
msg
.
type
))
{
rfbLog
(
"Warning: this program uses processCustomClientMessage, "
"which is deprecated.
\n
"
"Please use rfbRegisterProtocolExtension instead.
\n
"
);
return
;
}
rfbLog
(
"rfbProcessClientNormalMessage: unknown message type %d
\n
"
,
rfbLog
(
"rfbProcessClientNormalMessage: unknown message type %d
\n
"
,
msg
.
type
);
msg
.
type
);
rfbLog
(
" ... closing connection
\n
"
);
rfbLog
(
" ... closing connection
\n
"
);
...
@@ -1857,30 +1841,4 @@ rfbProcessUDPInput(rfbScreenInfoPtr rfbScreen)
...
@@ -1857,30 +1841,4 @@ rfbProcessUDPInput(rfbScreenInfoPtr rfbScreen)
}
}
}
}
#ifdef LIBVNCSERVER_BACKCHANNEL
void
rfbSendBackChannel
(
rfbScreenInfoPtr
rfbScreen
,
char
*
str
,
int
len
)
{
rfbClientPtr
cl
;
rfbBackChannelMsg
sct
;
rfbClientIteratorPtr
iterator
;
iterator
=
rfbGetClientIterator
(
rfbScreen
);
while
((
cl
=
rfbClientIteratorNext
(
iterator
))
!=
NULL
)
{
if
(
cl
->
enableBackChannel
)
{
sct
.
type
=
rfbBackChannel
;
sct
.
length
=
Swap32IfLE
(
len
);
if
(
rfbWriteExact
(
cl
,
(
char
*
)
&
sct
,
sz_rfbBackChannelMsg
)
<
0
)
{
rfbLogPerror
(
"rfbSendBackChannel: write"
);
rfbCloseClient
(
cl
);
continue
;
}
if
(
rfbWriteExact
(
cl
,
str
,
len
)
<
0
)
{
rfbLogPerror
(
"rfbSendBackChannel: write"
);
rfbCloseClient
(
cl
);
}
}
}
rfbReleaseClientIterator
(
iterator
);
}
#endif
libvncserver/stats.c
View file @
d15e3558
...
@@ -30,11 +30,7 @@ static const char* encNames[] = {
...
@@ -30,11 +30,7 @@ static const char* encNames[] = {
"raw"
,
"copyRect"
,
"RRE"
,
"[encoding 3]"
,
"CoRRE"
,
"hextile"
,
"raw"
,
"copyRect"
,
"RRE"
,
"[encoding 3]"
,
"CoRRE"
,
"hextile"
,
"zlib"
,
"tight"
,
"[encoding 8]"
,
"[encoding 9]"
,
"[encoding 10]"
,
"zlib"
,
"tight"
,
"[encoding 8]"
,
"[encoding 9]"
,
"[encoding 10]"
,
"[encoding 11]"
,
"[encoding 12]"
,
"[encoding 13]"
,
"[encoding 14]"
,
"[encoding 11]"
,
"[encoding 12]"
,
"[encoding 13]"
,
"[encoding 14]"
,
#ifdef LIBVNCSERVER_BACKCHANNEL
"BackChannel"
,
#else
"[encoding 15]"
,
"[encoding 15]"
,
#endif
"ZRLE"
,
"[encoding 17]"
,
"[encoding 18]"
,
"[encoding 19]"
,
"[encoding 20]"
"ZRLE"
,
"[encoding 17]"
,
"[encoding 18]"
,
"[encoding 19]"
,
"[encoding 20]"
};
};
...
...
libvncserver/tightvnc-filetransfer/filetransfermsg.c
View file @
d15e3558
...
@@ -319,6 +319,7 @@ GetFileDownloadResponseMsgInBlocks(rfbClientPtr cl, rfbTightClientPtr rtcp)
...
@@ -319,6 +319,7 @@ GetFileDownloadResponseMsgInBlocks(rfbClientPtr cl, rfbTightClientPtr rtcp)
}
}
return
CreateFileDownloadBlockSizeDataMsg
(
numOfBytesRead
,
pBuf
);
return
CreateFileDownloadBlockSizeDataMsg
(
numOfBytesRead
,
pBuf
);
}
}
return
GetFileDownLoadErrMsg
();
}
}
...
...
rfb/rfb.h
View file @
d15e3558
...
@@ -133,7 +133,6 @@ typedef rfbBool (*rfbSetTranslateFunctionProcPtr)(struct _rfbClientRec* cl);
...
@@ -133,7 +133,6 @@ typedef rfbBool (*rfbSetTranslateFunctionProcPtr)(struct _rfbClientRec* cl);
typedef
rfbBool
(
*
rfbPasswordCheckProcPtr
)(
struct
_rfbClientRec
*
cl
,
const
char
*
encryptedPassWord
,
int
len
);
typedef
rfbBool
(
*
rfbPasswordCheckProcPtr
)(
struct
_rfbClientRec
*
cl
,
const
char
*
encryptedPassWord
,
int
len
);
typedef
enum
rfbNewClientAction
(
*
rfbNewClientHookPtr
)(
struct
_rfbClientRec
*
cl
);
typedef
enum
rfbNewClientAction
(
*
rfbNewClientHookPtr
)(
struct
_rfbClientRec
*
cl
);
typedef
void
(
*
rfbDisplayHookPtr
)(
struct
_rfbClientRec
*
cl
);
typedef
void
(
*
rfbDisplayHookPtr
)(
struct
_rfbClientRec
*
cl
);
typedef
rfbBool
(
*
rfbProcessCustomClientMessageProcPtr
)(
struct
_rfbClientRec
*
cl
,
uint8_t
type
);
typedef
struct
{
typedef
struct
{
uint32_t
count
;
uint32_t
count
;
...
@@ -307,10 +306,6 @@ typedef struct _rfbScreenInfo
...
@@ -307,10 +306,6 @@ typedef struct _rfbScreenInfo
* link more interactive. */
* link more interactive. */
int
progressiveSliceHeight
;
int
progressiveSliceHeight
;
/* if LibVNCServer doesn't know the normal message, it calls this
* hook. If the hook handles the message, it returns TRUE. */
rfbProcessCustomClientMessageProcPtr
processCustomClientMessage
;
in_addr_t
listenInterface
;
in_addr_t
listenInterface
;
}
rfbScreenInfo
,
*
rfbScreenInfoPtr
;
}
rfbScreenInfo
,
*
rfbScreenInfoPtr
;
...
@@ -486,10 +481,6 @@ typedef struct _rfbClientRec {
...
@@ -486,10 +481,6 @@ typedef struct _rfbClientRec {
rfbBool
useNewFBSize
;
/* client supports NewFBSize encoding */
rfbBool
useNewFBSize
;
/* client supports NewFBSize encoding */
rfbBool
newFBSizePending
;
/* framebuffer size was changed */
rfbBool
newFBSizePending
;
/* framebuffer size was changed */
#ifdef LIBVNCSERVER_BACKCHANNEL
rfbBool
enableBackChannel
;
/* custom channel for special clients */
#endif
struct
_rfbClientRec
*
prev
;
struct
_rfbClientRec
*
prev
;
struct
_rfbClientRec
*
next
;
struct
_rfbClientRec
*
next
;
...
@@ -606,10 +597,6 @@ extern void rfbSendBell(rfbScreenInfoPtr rfbScreen);
...
@@ -606,10 +597,6 @@ extern void rfbSendBell(rfbScreenInfoPtr rfbScreen);
void
rfbGotXCutText
(
rfbScreenInfoPtr
rfbScreen
,
char
*
str
,
int
len
);
void
rfbGotXCutText
(
rfbScreenInfoPtr
rfbScreen
,
char
*
str
,
int
len
);
#ifdef LIBVNCSERVER_BACKCHANNEL
extern
void
rfbSendBackChannel
(
rfbScreenInfoPtr
s
,
char
*
message
,
int
len
);
#endif
/* translate.c */
/* translate.c */
extern
rfbBool
rfbEconomicTranslate
;
extern
rfbBool
rfbEconomicTranslate
;
...
...
rfb/rfbproto.h
View file @
d15e3558
...
@@ -358,9 +358,6 @@ typedef struct {
...
@@ -358,9 +358,6 @@ typedef struct {
#define rfbResizeFrameBuffer 4
#define rfbResizeFrameBuffer 4
#define rfbKeyFrameUpdate 5
#define rfbKeyFrameUpdate 5
#define rfbPalmVNCReSizeFrameBuffer 0xF
#define rfbPalmVNCReSizeFrameBuffer 0xF
#ifdef LIBVNCSERVER_BACKCHANNEL
#define rfbBackChannel 15
#endif
/* client -> server */
/* client -> server */
...
@@ -406,9 +403,6 @@ typedef struct {
...
@@ -406,9 +403,6 @@ typedef struct {
#define rfbEncodingZlibHex 8
#define rfbEncodingZlibHex 8
#define rfbEncodingUltra 9
#define rfbEncodingUltra 9
#endif
#endif
#ifdef LIBVNCSERVER_BACKCHANNEL
#define rfbEncodingBackChannel 15
#endif
#ifdef LIBVNCSERVER_HAVE_LIBZ
#ifdef LIBVNCSERVER_HAVE_LIBZ
#define rfbEncodingZRLE 16
#define rfbEncodingZRLE 16
#endif
#endif
...
@@ -899,11 +893,6 @@ typedef struct {
...
@@ -899,11 +893,6 @@ typedef struct {
#define sz_rfbServerCutTextMsg 8
#define sz_rfbServerCutTextMsg 8
#ifdef LIBVNCSERVER_BACKCHANNEL
typedef
rfbServerCutTextMsg
rfbBackChannelMsg
;
#define sz_rfbBackChannelMsg 8
#endif
/*-----------------------------------------------------------------------------
/*-----------------------------------------------------------------------------
* // Modif sf@2002
* // Modif sf@2002
...
...
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