/* List of shared folders nodes. */
static DblLnkLst_Links gHgfsSharedFoldersList;
+static Bool gHgfsInitialized = FALSE;
+
/*
* Number of active sessions that support change directory notification. HGFS server
* needs to maintain up-to-date shared folders list when there is
if (Config_GetBool(TRUE, "isolation.tools.hgfs.notify.enable")) {
gHgfsDirNotifyActive = HgfsNotify_Init() == HGFS_STATUS_SUCCESS;
}
+ gHgfsInitialized = TRUE;
} else {
HgfsServer_ExitState(); // Cleanup partially initialized state
}
void
HgfsServer_ExitState(void)
{
+ gHgfsInitialized = FALSE;
+
if (gHgfsDirNotifyActive) {
HgfsNotify_Shutdown();
gHgfsDirNotifyActive = FALSE;
void
HgfsServer_Quiesce(Bool freeze)
{
+ if (!gHgfsInitialized) {
+ return;
+ }
+
if (freeze) {
/* Suspend background activity. */
if (gHgfsDirNotifyActive) {