summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2011-10-08 14:40:50 -0500
committerJohannes Schindelin <johannes.schindelin@gmx.de>2011-10-08 14:40:50 -0500
commit2ad0968220da70e34e717daf94d6ba62da028ab1 (patch)
tree69701c2eb1ce3bf5bb26ad3bbb97cb16f241787b
parentf25a886cba4dc0e2e2a246b23340c48e7388465b (diff)
downloadlibvncserver-2ad0968220da70e34e717daf94d6ba62da028ab1.zip
libvncserver-2ad0968220da70e34e717daf94d6ba62da028ab1.tar.gz
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: Johannes Schindelin <johannes.schindelin@gmx.de>
-rw-r--r--rfb/rfbclient.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/rfb/rfbclient.h b/rfb/rfbclient.h
index f3bd11d..9b8f3c3 100644
--- a/rfb/rfbclient.h
+++ b/rfb/rfbclient.h
@@ -192,9 +192,6 @@ typedef struct _rfbClient {
rfbPixelFormat format;
rfbServerInitMsg si;
- /* listen.c */
- int listenSock;
-
/* sockets.c */
#define RFB_BUF_SIZE 8192
char buf[RFB_BUF_SIZE];
@@ -273,7 +270,6 @@ typedef struct _rfbClient {
SoftCursorLockAreaProc SoftCursorLockArea;
SoftCursorUnlockScreenProc SoftCursorUnlockScreen;
GotFrameBufferUpdateProc GotFrameBufferUpdate;
- FinishedFrameBufferUpdateProc FinishedFrameBufferUpdate;
/** the pointer returned by GetPassword will be freed after use! */
GetPasswordProc GetPassword;
MallocFrameBufferProc MallocFrameBuffer;
@@ -325,6 +321,11 @@ typedef struct _rfbClient {
/** hook to handle xvp server messages */
HandleXvpMsgProc HandleXvpMsg;
+
+ /* listen.c */
+ int listenSock;
+
+ FinishedFrameBufferUpdateProc FinishedFrameBufferUpdate;
} rfbClient;
/* cursor.c */
OpenPOWER on IntegriCloud