/* assume the server is a gateway */
result = gpst_login(vpninfo, 0, &ctx);
} else {
- /* first try handling it as a gateway, then a portal */
- result = gpst_login(vpninfo, 0, &ctx);
+ /* first try handling it as a portal, then a gateway */
+ result = gpst_login(vpninfo, 1, &ctx);
if (result == -EEXIST) {
- result = gpst_login(vpninfo, 1, &ctx);
+ result = gpst_login(vpninfo, 0, &ctx);
if (result == -EEXIST)
vpn_progress(vpninfo, PRG_ERR, _("Server is neither a GlobalProtect portal nor a gateway.\n"));
}