diff options
author | Marc-André Moreau <marcandre.moreau@gmail.com> | 2012-05-07 06:40:51 -0700 |
---|---|---|
committer | Marc-André Moreau <marcandre.moreau@gmail.com> | 2012-05-07 06:40:51 -0700 |
commit | 9a03ab966d4d5e7883ff201dc6d455e5e7b7fb5f (patch) | |
tree | 22f25af6d42ed729e6a80613d45da68a053a5314 | |
parent | 4abe43ce9e8c0f3885ffb667af7e4224a7cd2d47 (diff) | |
parent | c503c5fe0f4ec9b84f2b10b859c6728603bf327e (diff) | |
download | xrdp-proprietary-9a03ab966d4d5e7883ff201dc6d455e5e7b7fb5f.tar.gz xrdp-proprietary-9a03ab966d4d5e7883ff201dc6d455e5e7b7fb5f.zip |
Merge pull request #14 from ArvidNorr/freerdpconnecterror
added connect error messages for freerdp1
-rw-r--r-- | freerdp1/xrdp-freerdp.c | 56 |
1 files changed, 55 insertions, 1 deletions
diff --git a/freerdp1/xrdp-freerdp.c b/freerdp1/xrdp-freerdp.c index 3c52def0..69bc0ca0 100644 --- a/freerdp1/xrdp-freerdp.c +++ b/freerdp1/xrdp-freerdp.c @@ -69,7 +69,61 @@ lxrdp_connect(struct mod* mod) if (!ok) { - return 1; + LLOGLN(0, ("Failure to connect")); + if(connectErrorCode){ + char buf[128]; + if(connectErrorCode<ERRORSTART){ + if(strerror_r(connectErrorCode,buf,128)!=0){ + snprintf(buf,128,"Errorcode from connect : %d",connectErrorCode); + } + }else{ + switch(connectErrorCode){ + case PREECONNECTERROR:{ + snprintf(buf,128,"The error code from connect is PREECONNECTERROR"); + break ; + } + case UNDEFINEDCONNECTERROR:{ + snprintf(buf,128,"The error code from connect is UNDEFINEDCONNECTERROR"); + break ; + } + case POSTCONNECTERROR:{ + snprintf(buf,128,"The error code from connect is POSTCONNECTERROR"); + break ; + } + case DNSERROR:{ + snprintf(buf,128,"The DNS system generated an error"); + break ; + } + case DNSNAMENOTFOUND:{ + snprintf(buf,128,"The DNS system could not find the specified name"); + break ; + } + case CONNECTERROR:{ + snprintf(buf,128,"A general connect error was returned"); + break ; + } + case MCSCONNECTINITIALERROR:{ + snprintf(buf,128,"The error code from connect is MCSCONNECTINITIALERROR"); + break ; + } + case TLSCONNECTERROR:{ + snprintf(buf,128,"Error in TLS handshake"); + break ; + } + case AUTHENTICATIONERROR:{ + snprintf(buf,128,"Authentication error check your password and username"); + break ; + } + + default:{ + snprintf(buf,128,"Unhandled Errorcode from connect : %d",connectErrorCode); + break ; + } + } + } + mod->server_msg(mod,buf,0); + } + return 1; } return 0; } |