Correctly handling connection failure.

This commit is contained in:
Vic Lee 2011-08-22 17:42:16 +08:00
parent 0c60fafebd
commit 4377c46bac
3 changed files with 6 additions and 3 deletions

View File

@ -265,7 +265,8 @@ int dfreerdp_run(freerdp* instance)
memset(rfds, 0, sizeof(rfds));
memset(wfds, 0, sizeof(wfds));
instance->Connect(instance);
if (!instance->Connect(instance))
return 0;
dfi = GET_DFI(instance);
chanman = GET_CHANMAN(instance);

View File

@ -489,7 +489,8 @@ int xfreerdp_run(freerdp* instance)
memset(rfds, 0, sizeof(rfds));
memset(wfds, 0, sizeof(wfds));
instance->Connect(instance);
if (!instance->Connect(instance))
return 0;
xfi = GET_XFI(instance);
chanman = GET_CHANMAN(instance);

View File

@ -35,7 +35,8 @@ boolean freerdp_connect(freerdp* instance)
IFCALL(instance->PreConnect, instance);
status = rdp_client_connect((rdpRdp*) instance->rdp);
IFCALL(instance->PostConnect, instance);
if (status)
IFCALL(instance->PostConnect, instance);
return status;
}