diff options
author | runge <runge@karlrunge.com> | 2009-06-18 22:34:43 -0400 |
---|---|---|
committer | runge <runge@karlrunge.com> | 2009-06-18 22:34:43 -0400 |
commit | ac33a29f07ecd99d9e9b73f7341ae7651994ecb2 (patch) | |
tree | fabfd352fcff53622922105ad590c4d011a0f4d7 | |
parent | 61383c508e9a12c879bd94c77885e0ec0d7c47f8 (diff) | |
parent | ef33182694992202ac3ac987dc12c5c6272e798e (diff) | |
download | libtdevnc-ac33a29f07ecd99d9e9b73f7341ae7651994ecb2.tar.gz libtdevnc-ac33a29f07ecd99d9e9b73f7341ae7651994ecb2.zip |
Merge branch 'master' of ssh://runge@libvncserver.git.sourceforge.net/gitroot/libvncserver
-rw-r--r-- | libvncclient/vncviewer.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libvncclient/vncviewer.c b/libvncclient/vncviewer.c index 752f0a7..a5f2f89 100644 --- a/libvncclient/vncviewer.c +++ b/libvncclient/vncviewer.c @@ -111,10 +111,9 @@ rfbClient* rfbGetClient(int bitsPerSample,int samplesPerPixel, return NULL; } initAppData(&client->appData); - client->programName = NULL; client->endianTest = 1; client->programName=""; - client->serverHost=""; + client->serverHost=strdup(""); client->serverPort=5900; client->CurrentKeyboardLedState = 0; @@ -265,6 +264,9 @@ rfbBool rfbInitClient(rfbClient* client,int* argc,char** argv) { } else { char* colon=strchr(argv[i],':'); + if(client->serverHost) + free(client->serverHost); + if(colon) { client->serverHost=strdup(argv[i]); client->serverHost[(int)(colon-argv[i])]='\0'; |