diff options
author | dscho <dscho> | 2005-01-21 14:29:30 +0000 |
---|---|---|
committer | dscho <dscho> | 2005-01-21 14:29:30 +0000 |
commit | ba10bceedd9169fabc120c22538649723b92af67 (patch) | |
tree | 1eb36c6443956a0ad51ec02804eebdd4907a3fba /libvncclient | |
parent | 80ca7cf1d324366836f3b55c786cad45fa9680ce (diff) | |
download | libtdevnc-ba10bceedd9169fabc120c22538649723b92af67.tar.gz libtdevnc-ba10bceedd9169fabc120c22538649723b92af67.zip |
if no argc & argv are passed, honour the serverHost&serverPort which was set by the application
Diffstat (limited to 'libvncclient')
-rw-r--r-- | libvncclient/vncviewer.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/libvncclient/vncviewer.c b/libvncclient/vncviewer.c index 07465c7..60f3279 100644 --- a/libvncclient/vncviewer.c +++ b/libvncclient/vncviewer.c @@ -108,6 +108,9 @@ rfbClient* rfbGetClient(int bitsPerSample,int samplesPerPixel, initAppData(&client->appData); client->programName = 0; client->endianTest = 1; + client->programName=""; + client->serverHost=""; + client->serverPort=5900; client->format.bitsPerPixel = bytesPerPixel*8; client->format.depth = bitsPerSample*samplesPerPixel; @@ -188,11 +191,7 @@ static rfbBool rfbInitConnection(rfbClient* client) rfbBool rfbInitClient(rfbClient* client,int* argc,char** argv) { int i,j; - if(argv==0 || argc==0 || *argc==0) { - client->programName=""; - client->serverHost=""; - client->serverPort=5900; - } else { + if(argv>0 && argc && *argc) { if(client->programName==0) client->programName=argv[0]; |