diff options
author | dscho <dscho> | 2004-10-16 02:46:52 +0000 |
---|---|---|
committer | dscho <dscho> | 2004-10-16 02:46:52 +0000 |
commit | b583cf5347fbd3f1d45e068a970e9cc207337e78 (patch) | |
tree | c4f0e9dd5fab0adaa233442fd51b33b545959a01 /libvncclient/vncviewer.c | |
parent | 8715a8ab4243f667e38ad315d98fc38588946362 (diff) | |
download | libtdevnc-b583cf5347fbd3f1d45e068a970e9cc207337e78.tar.gz libtdevnc-b583cf5347fbd3f1d45e068a970e9cc207337e78.zip |
move read buffer to rfbClient structure (thread safety); make rfbClientLog
overrideable
Diffstat (limited to 'libvncclient/vncviewer.c')
-rw-r--r-- | libvncclient/vncviewer.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libvncclient/vncviewer.c b/libvncclient/vncviewer.c index 417bd2f..914b422 100644 --- a/libvncclient/vncviewer.c +++ b/libvncclient/vncviewer.c @@ -23,6 +23,7 @@ #include <stdio.h> #include <stdlib.h> +#include <string.h> #include <time.h> #include <rfb/rfbclient.h> @@ -128,6 +129,9 @@ rfbClient* rfbGetClient(int bitsPerSample,int samplesPerPixel, } } + client->bufoutptr=client->buf; + client->buffered=0; + client->HandleCursorPos = DummyPoint; client->SoftCursorLockArea = DummyRect; client->SoftCursorUnlockScreen = Dummy; @@ -188,7 +192,7 @@ rfbBool rfbInitClient(rfbClient* client,int* argc,char** argv) { char* colon=strchr(argv[i],':'); if(colon) { - client->serverHost=strndup(argv[i],colon-argv[i]); + client->serverHost=strndup(argv[i],(int)(colon-argv[i])); client->serverPort=atoi(colon+1); } else { client->serverHost=strdup(argv[i]); |