Commit ba10bcee authored by dscho's avatar dscho

if no argc & argv are passed, honour the serverHost&serverPort which was set by the application

parent 80ca7cf1
...@@ -108,6 +108,9 @@ rfbClient* rfbGetClient(int bitsPerSample,int samplesPerPixel, ...@@ -108,6 +108,9 @@ rfbClient* rfbGetClient(int bitsPerSample,int samplesPerPixel,
initAppData(&client->appData); initAppData(&client->appData);
client->programName = 0; client->programName = 0;
client->endianTest = 1; client->endianTest = 1;
client->programName="";
client->serverHost="";
client->serverPort=5900;
client->format.bitsPerPixel = bytesPerPixel*8; client->format.bitsPerPixel = bytesPerPixel*8;
client->format.depth = bitsPerSample*samplesPerPixel; client->format.depth = bitsPerSample*samplesPerPixel;
...@@ -188,11 +191,7 @@ static rfbBool rfbInitConnection(rfbClient* client) ...@@ -188,11 +191,7 @@ static rfbBool rfbInitConnection(rfbClient* client)
rfbBool rfbInitClient(rfbClient* client,int* argc,char** argv) { rfbBool rfbInitClient(rfbClient* client,int* argc,char** argv) {
int i,j; int i,j;
if(argv==0 || argc==0 || *argc==0) { if(argv>0 && argc && *argc) {
client->programName="";
client->serverHost="";
client->serverPort=5900;
} else {
if(client->programName==0) if(client->programName==0)
client->programName=argv[0]; client->programName=argv[0];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment