Commit 2ad09682 authored by Johannes Schindelin's avatar Johannes Schindelin

Hopefully fix the crash when updating from 0.9.7 or earlier

For backwards-compatibility reasons, we can only add struct members to the
end. That way, existing callers still can use newer libraries, as the
structs are always allocated by the library (and therefore guaranteed to
have the correct size) and still rely on the same position of the parts
the callers know about.

Reported by Luca Falavigna.
Signed-off-by: 's avatarJohannes Schindelin <johannes.schindelin@gmx.de>
parent f25a886c
...@@ -192,9 +192,6 @@ typedef struct _rfbClient { ...@@ -192,9 +192,6 @@ typedef struct _rfbClient {
rfbPixelFormat format; rfbPixelFormat format;
rfbServerInitMsg si; rfbServerInitMsg si;
/* listen.c */
int listenSock;
/* sockets.c */ /* sockets.c */
#define RFB_BUF_SIZE 8192 #define RFB_BUF_SIZE 8192
char buf[RFB_BUF_SIZE]; char buf[RFB_BUF_SIZE];
...@@ -273,7 +270,6 @@ typedef struct _rfbClient { ...@@ -273,7 +270,6 @@ typedef struct _rfbClient {
SoftCursorLockAreaProc SoftCursorLockArea; SoftCursorLockAreaProc SoftCursorLockArea;
SoftCursorUnlockScreenProc SoftCursorUnlockScreen; SoftCursorUnlockScreenProc SoftCursorUnlockScreen;
GotFrameBufferUpdateProc GotFrameBufferUpdate; GotFrameBufferUpdateProc GotFrameBufferUpdate;
FinishedFrameBufferUpdateProc FinishedFrameBufferUpdate;
/** the pointer returned by GetPassword will be freed after use! */ /** the pointer returned by GetPassword will be freed after use! */
GetPasswordProc GetPassword; GetPasswordProc GetPassword;
MallocFrameBufferProc MallocFrameBuffer; MallocFrameBufferProc MallocFrameBuffer;
...@@ -325,6 +321,11 @@ typedef struct _rfbClient { ...@@ -325,6 +321,11 @@ typedef struct _rfbClient {
/** hook to handle xvp server messages */ /** hook to handle xvp server messages */
HandleXvpMsgProc HandleXvpMsg; HandleXvpMsgProc HandleXvpMsg;
/* listen.c */
int listenSock;
FinishedFrameBufferUpdateProc FinishedFrameBufferUpdate;
} rfbClient; } rfbClient;
/* cursor.c */ /* cursor.c */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment