* directory or online at http://www.openafs.org/dl/license10.html
*/
+#include <winsock2.h>
+#include <ws2tcpip.h>
+
extern "C" {
+#include <afsconfig.h>
#include <afs/param.h>
+#include <roken.h>
#include <afs/stds.h>
+#include <afs/cm.h>
#include <rx/rxkad.h>
#include <afs/cm_config.h>
}
{
case IDAPPLY:
if (!GeneralTab_OnApply (hDlg, FALSE, TRUE))
- SetWindowLong (hDlg, DWL_MSGRESULT, TRUE);
+ SetWindowLongPtr (hDlg, DWLP_MSGRESULT, TRUE);
else if (g.fIsWinNT && !GeneralTab_AskIfStopped (hDlg))
- SetWindowLong (hDlg, DWL_MSGRESULT, TRUE);
+ SetWindowLongPtr (hDlg, DWLP_MSGRESULT, TRUE);
break;
case IDC_REFRESH:
if (!fForce)
{
// Don't try to do anything if we've already failed the apply
- if (GetWindowLong (hDlg, DWL_MSGRESULT))
+ if (GetWindowLongPtr (hDlg, DWLP_MSGRESULT))
return FALSE;
}
BOOL fLogonAuthent = IsDlgButtonChecked (hDlg, IDC_LOGON);
if (fLogonAuthent != g.Configuration.fLogonAuthent)
{
- SetBitLogonOption(fLogonAuthent,LOGON_OPTION_INTEGRATED);
+ SetBitLogonOption(fLogonAuthent,LOGON_OPTION_INTEGRATED);
g.Configuration.fLogonAuthent = fLogonAuthent;
}
- Config_SetTrayIconFlag (IsDlgButtonChecked (hDlg, IDC_TRAYICON));
+ if (GetDlgItem(hDlg, IDC_TRAYICON) != NULL)
+ Config_SetTrayIconFlag (IsDlgButtonChecked(hDlg, IDC_TRAYICON));
if (g.fIsWinNT)
{
{
BOOL fFound = FALSE;
CELLSERVDB CellServDB;
-
- if (CSDB_ReadFile (&CellServDB, NULL))
+ char cellname[256], i;
+
+ /* we pray for all ascii cellnames */
+ for ( i=0 ; pszCell[i] && i < (sizeof(cellname)-1) ; i++ )
+ cellname[i] = pszCell[i];
+ cellname[i] = '\0';
+
+ ULONG code = cm_SearchCellRegistry(1, cellname, NULL, NULL, NULL, NULL);
+ if (code == 0)
+ fFound = TRUE;
+ if (!fFound &&
+ (code != CM_ERROR_FORCE_DNS_LOOKUP) &&
+ CSDB_ReadFile (&CellServDB, NULL))
{
if (CSDB_FindCell (&CellServDB, pszCell))
fFound = TRUE;
CSDB_FreeFile (&CellServDB);
}
-#ifdef AFS_AFSDB_ENV
- if ( fFound == FALSE ) {
- int ttl;
- char cellname[128], i;
-
- /* we pray for all ascii cellnames */
- for ( i=0 ; pszCell[i] && i < (sizeof(cellname)-1) ; i++ )
- cellname[i] = pszCell[i];
- cellname[i] = '\0';
-
- fFound = !cm_SearchCellByDNS(cellname, NULL, &ttl, NULL, NULL);
- }
-#endif
+ if ( fFound == FALSE ) {
+ int ttl;
+ fFound = !cm_SearchCellByDNS(cellname, NULL, &ttl, NULL, NULL);
+ }
+ done:
+
return fFound;
}