Skip to content

Commit 6196041

Browse files
committed
Put #ifdef around some RDP error constants
1 parent 1b4fd83 commit 6196041

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

remmina-plugins/rdp/rdp_plugin.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1025,34 +1025,46 @@ static gboolean remmina_rdp_main(RemminaProtocolWidget* gp)
10251025
switch (e) {
10261026
case FREERDP_ERROR_AUTHENTICATION_FAILED:
10271027
case STATUS_LOGON_FAILURE: // wrong return code from FreeRDP introduced at the end of July 2016 ? (fixed with b86c0ba)
1028+
#ifdef FREERDP_ERROR_CONNECT_LOGON_FAILURE
10281029
case FREERDP_ERROR_CONNECT_LOGON_FAILURE:
1030+
#endif
10291031
remmina_plugin_service->protocol_plugin_set_error(gp, _("Authentication to RDP server %s failed.\nCheck username, password and domain."),
10301032
rfi->settings->ServerHostname );
10311033
// Invalidate the saved password, so the user will be re-asked at next logon
10321034
remmina_plugin_service->file_unsave_password(remminafile);
10331035
break;
10341036
case STATUS_ACCOUNT_LOCKED_OUT:
1037+
#ifdef FREERDP_ERROR_CONNECT_ACCOUNT_LOCKED_OUT
10351038
case FREERDP_ERROR_CONNECT_ACCOUNT_LOCKED_OUT:
1039+
#endif
10361040
remmina_plugin_service->protocol_plugin_set_error(gp, _("Access to RDP server %s failed.\nAccount is locked out."),
10371041
rfi->settings->ServerHostname );
10381042
break;
10391043
case STATUS_ACCOUNT_EXPIRED:
1044+
#ifdef FREERDP_ERROR_CONNECT_ACCOUNT_EXPIRED
10401045
case FREERDP_ERROR_CONNECT_ACCOUNT_EXPIRED:
1046+
#endif
10411047
remmina_plugin_service->protocol_plugin_set_error(gp, _("Access to RDP server %s failed.\nAccount is expired."),
10421048
rfi->settings->ServerHostname );
10431049
break;
10441050
case STATUS_PASSWORD_EXPIRED:
1051+
#ifdef FREERDP_ERROR_CONNECT_PASSWORD_EXPIRED
10451052
case FREERDP_ERROR_CONNECT_PASSWORD_EXPIRED:
1053+
#endif
10461054
remmina_plugin_service->protocol_plugin_set_error(gp, _("Access to RDP server %s failed.\nPassword expired."),
10471055
rfi->settings->ServerHostname );
10481056
break;
10491057
case STATUS_ACCOUNT_DISABLED:
1058+
#ifdef FREERDP_ERROR_CONNECT_ACCOUNT_DISABLED
10501059
case FREERDP_ERROR_CONNECT_ACCOUNT_DISABLED:
1060+
#endif
10511061
remmina_plugin_service->protocol_plugin_set_error(gp, _("Access to RDP server %s failed.\nAccount is disabled."),
10521062
rfi->settings->ServerHostname );
10531063
break;
10541064
case STATUS_ACCOUNT_RESTRICTION:
1065+
#ifdef FREERDP_ERROR_CONNECT_ACCOUNT_RESTRICTION
10551066
case FREERDP_ERROR_CONNECT_ACCOUNT_RESTRICTION:
1067+
#endif
10561068
remmina_plugin_service->protocol_plugin_set_error(gp, _("Access to RDP server %s failed.\nAccount has restrictions."),
10571069
rfi->settings->ServerHostname );
10581070
break;

0 commit comments

Comments
 (0)