From: Oliver Kurth Date: Fri, 15 Sep 2017 18:23:42 +0000 (-0700) Subject: Hgfs Server: Remove the register share callback and usage X-Git-Tag: stable-10.2.0~184 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=028854fd377698d261aad7787723e4d3db1069b9;p=thirdparty%2Fopen-vm-tools.git Hgfs Server: Remove the register share callback and usage 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. --- diff --git a/open-vm-tools/lib/hgfsServerManagerGuest/hgfsServerManagerGuest.c b/open-vm-tools/lib/hgfsServerManagerGuest/hgfsServerManagerGuest.c index 033614e2d..da9339801 100644 --- a/open-vm-tools/lib/hgfsServerManagerGuest/hgfsServerManagerGuest.c +++ b/open-vm-tools/lib/hgfsServerManagerGuest/hgfsServerManagerGuest.c @@ -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; } diff --git a/open-vm-tools/lib/hgfsServerPolicyGuest/hgfsServerPolicyGuest.c b/open-vm-tools/lib/hgfsServerPolicyGuest/hgfsServerPolicyGuest.c index c9ddde907..a593d5cdb 100644 --- a/open-vm-tools/lib/hgfsServerPolicyGuest/hgfsServerPolicyGuest.c +++ b/open-vm-tools/lib/hgfsServerPolicyGuest/hgfsServerPolicyGuest.c @@ -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); diff --git a/open-vm-tools/lib/include/hgfsServerPolicy.h b/open-vm-tools/lib/include/hgfsServerPolicy.h index e84c403d9..72efd6478 100644 --- a/open-vm-tools/lib/include/hgfsServerPolicy.h +++ b/open-vm-tools/lib/include/hgfsServerPolicy.h @@ -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