From b583cf5347fbd3f1d45e068a970e9cc207337e78 Mon Sep 17 00:00:00 2001 From: dscho Date: Sat, 16 Oct 2004 02:46:52 +0000 Subject: move read buffer to rfbClient structure (thread safety); make rfbClientLog overrideable --- libvncclient/vncviewer.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'libvncclient/vncviewer.c') 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 #include +#include #include #include @@ -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]); -- cgit v1.2.1