]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Hgfs Server: Remove the register share callback and usage
authorOliver Kurth <okurth@vmware.com>
Fri, 15 Sep 2017 18:23:42 +0000 (11:23 -0700)
committerOliver Kurth <okurth@vmware.com>
Fri, 15 Sep 2017 18:23:42 +0000 (11:23 -0700)
Remove the register share callback and usage which is an HGFS server
libray function passed back to the VMX Hgfs server manager and policy
manager. This tracked shares as they were individually added and removed.
It carried with it VMDB behavior which was erroneous for the HGFS server
share tracking.

This API has been replaced by piggybacking on the Hgfs server InvalidateObjects
callback which informs the Hgfs server when the VMDB has finished updating
the Hgfs policy manager with shares and the Policy manager's list is complete.
At this point the Hgfs server can close any open handles on stale shares and
remove those stale shares and add new shares.

open-vm-tools/lib/hgfsServerManagerGuest/hgfsServerManagerGuest.c
open-vm-tools/lib/hgfsServerPolicyGuest/hgfsServerPolicyGuest.c
open-vm-tools/lib/include/hgfsServerPolicy.h

index 033614e2d696f62376a3c4b4b1329448620d7c48..da9339801bada1fe03da40bc36bebdfa153461bf 100644 (file)
@@ -109,7 +109,6 @@ HgfsServerManager_Register(HgfsServerMgrData *data)   // IN: RpcIn channel
     * down through the channel guest into the HGFS server directly.
     */
    if (!HgfsServerPolicy_Init(NULL,
-                              NULL,
                               &gHgfsServerManagerGuestData.enumResources)) {
       return FALSE;
    }
index c9ddde9074b3f47dffc8580ebee8e3c31a8bf849..a593d5cdb4a00cb68fa6a0935c31c4f26950e5eb 100644 (file)
@@ -158,7 +158,6 @@ HgfsServerPolicyDestroyShares(DblLnkLst_Links *head) // IN
 
 Bool
 HgfsServerPolicy_Init(HgfsInvalidateObjectsFunc invalidateObjects,  // Unused
-                      HgfsRegisterSharedFolderFunc registerFolder,  // Unused
                       HgfsServerResEnumCallbacks *enumResources)    // OUT enum callbacks
 {
    HgfsSharedFolder *rootShare;
@@ -168,7 +167,6 @@ HgfsServerPolicy_Init(HgfsInvalidateObjectsFunc invalidateObjects,  // Unused
     * it in.
     */
    ASSERT(invalidateObjects == NULL);
-   ASSERT(registerFolder == NULL);
 
    DblLnkLst_Init(&myState.shares);
 
index e84c403d9a08a3ed72ada9a2c80af17624b91d3c..72efd647817139c928ed927f5cd3110dfaf4479e 100644 (file)
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 1998-2016 VMware, Inc. All rights reserved.
+ * Copyright (C) 1998-2017 VMware, Inc. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as published
@@ -78,7 +78,6 @@ typedef struct HgfsServerPolicy_ShareList {
 
 Bool
 HgfsServerPolicy_Init(HgfsInvalidateObjectsFunc invalidateObjects,
-                      HgfsRegisterSharedFolderFunc registerFolder,
                       HgfsServerResEnumCallbacks *enumResources);
 
 Bool