#include <string.h>
#include "afsd.h"
+#include "smb.h"
#include <rx/rx.h>
#include <rx/rx_prototypes.h>
cm_bkgRequest_t *rp;
afs_int32 code;
char name[32] = "";
- long daemonID = (long)parm;
+ long daemonID = (long)(LONG_PTR)parm;
- snprintf(name, sizeof(name), "cm_BkgDaemon_ShutdownEvent%d", daemonID);
+ snprintf(name, sizeof(name), "cm_BkgDaemon_ShutdownEvent%u", daemonID);
cm_BkgDaemon_ShutdownEvent[daemonID] = thrd_CreateEvent(NULL, FALSE, FALSE, name);
if ( GetLastError() == ERROR_ALREADY_EXISTS )
afsi_log("No Windows Firewall detected");
}
+ if (cm_freelanceEnabled && cm_freelanceImportCellServDB)
+ cm_FreelanceImportCellServDB();
+
/* ping all file servers, up or down, with unauthenticated connection,
* to find out whether we have all our callbacks from the server still.
* Also, ping down VLDBs.
cm_VolStatus_Network_Addr_Change();
}
- if (now > lastVolCheck + cm_daemonCheckVolInterval &&
+ /*
+ * Once every five minutes inspect the volume list and enforce
+ * the volume location expiration time.
+ */
+ if (now > lastVolCheck + 300 &&
daemon_ShutdownFlag == 0 &&
powerStateSuspended == 0) {
lastVolCheck = now;
- cm_RefreshVolumes();
+ cm_RefreshVolumes(cm_daemonCheckVolInterval);
if (daemon_ShutdownFlag == 1)
break;
now = osi_Time();
for(i=0; i < cm_nDaemons; i++) {
phandle = thrd_Create((SecurityAttrib) 0, 0,
- (ThreadFunc) cm_BkgDaemon, (LPVOID)i, 0, &pid,
+ (ThreadFunc) cm_BkgDaemon, (LPVOID)(LONG_PTR)i, 0, &pid,
"cm_BkgDaemon");
osi_assertx(phandle != NULL, "cm_BkgDaemon thread creation failure");
thrd_CloseHandle(phandle);