Merge branch 'master' of github.com:mrthebunny/FreeRDP

This commit is contained in:
Marc-André Moreau 2014-03-28 12:30:24 -04:00
commit 2524cebfa2
3 changed files with 17 additions and 4 deletions

View File

@ -152,7 +152,7 @@ DWORD mac_client_update_thread(void* param)
}
ExitThread(0);
return NULL;
return 0;
}
DWORD mac_client_input_thread(void* param)
@ -177,7 +177,7 @@ DWORD mac_client_input_thread(void* param)
}
ExitThread(0);
return NULL;
return 0;
}
DWORD mac_client_channels_thread(void* param)
@ -214,7 +214,7 @@ DWORD mac_client_channels_thread(void* param)
}
ExitThread(0);
return NULL;
return 0;
}
DWORD mac_client_thread(void* param)

View File

@ -177,7 +177,6 @@ FREERDP_API extern int connectErrorCode;
#define CANCELEDBYUSER ERRORSTART + 11
/**
* FreeRDP Context Error Codes
*/
@ -229,6 +228,8 @@ FREERDP_API extern int connectErrorCode;
#define FREERDP_ERROR_AUTHENTICATION_FAILED MAKE_FREERDP_ERROR(CONNECT, 9)
#define FREERDP_ERROR_INSUFFICIENT_PRIVILEGES MAKE_FREERDP_ERROR(CONNECT, 10)
#define FREERDP_ERROR_CONNECT_CANCELLED MAKE_FREERDP_ERROR(CONNECT, 11)
#define FREERDP_ERROR_SECURITY_NEGO_CONNECT_FAILED MAKE_FREERDP_ERROR(CONNECT, 12)
#define FREERDP_ERROR_CONNECT_TRANSPORT_FAILED MAKE_FREERDP_ERROR(CONNECT, 13)
#ifdef __cplusplus
}

View File

@ -251,6 +251,11 @@ BOOL rdp_client_connect(rdpRdp* rdp)
if (!nego_connect(rdp->nego))
{
if (!freerdp_get_last_error(rdp->context))
{
freerdp_set_last_error(rdp->context, FREERDP_ERROR_SECURITY_NEGO_CONNECT_FAILED);
}
fprintf(stderr, "Error: protocol security negotiation or connection failure\n");
return FALSE;
}
@ -286,8 +291,15 @@ BOOL rdp_client_connect(rdpRdp* rdp)
while (rdp->state != CONNECTION_STATE_ACTIVE)
{
if (rdp_check_fds(rdp) < 0)
{
if (!freerdp_get_last_error(rdp->context))
{
freerdp_set_last_error(rdp->context, FREERDP_ERROR_CONNECT_TRANSPORT_FAILED);
}
return FALSE;
}
}
return TRUE;
}