]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Hgfs Server: Remove the register share callback and usage part 2
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)
Now the function is not being called at all it is time to remove
it along with the callback table entry for it.

open-vm-tools/lib/hgfsServer/hgfsServer.c
open-vm-tools/lib/include/hgfsServer.h

index 22bc566f8a76e935e96949cea4d226e1185c8f2f..31733218d23e21cea8e91206295c2d52e273c973 100644 (file)
@@ -234,9 +234,6 @@ static void HgfsServerSessionInvalidateObjects(void *clientData,
                                                DblLnkLst_Links *shares);
 static uint32 HgfsServerSessionInvalidateInactiveSessions(void *clientData);
 static void HgfsServerSessionSendComplete(HgfsPacket *packet, void *clientData);
-static HgfsSharedFolderHandle HgfsServerRegisterShare(const char *shareName,
-                                                      const char *sharePath,
-                                                      Bool addFolder);
 
 /*
  * Callback table passed to transport and any channels.
@@ -251,7 +248,6 @@ static const HgfsServerCallbacks gHgfsServerCBTable = {
       HgfsServerSessionInvalidateInactiveSessions,
       HgfsServerSessionSendComplete,
    },
-   HgfsServerRegisterShare,
 };
 
 /* Lock that protects shared folders list. */
@@ -3797,47 +3793,6 @@ HgfsServerSharesReset(DblLnkLst_Links *newSharesList)  // IN: List of new shares
 }
 
 
-/*
- *-----------------------------------------------------------------------------
- *
- * HgfsServerRegisterShare --
- *
- *    This is a callback function which is invoked by hgfsServerManagement
- *    for every shared folder when something changed in shared folders
- *    configuration. The function iterates through the list of existing
- *    shared folders trying to locate an entry with the shareName. If the
- *    entry is found the function returns corresponding handle. Otherwise
- *    it creates a new entry and assigns a new handle to it.
- *
- *    Currently there is no notification that a shared folder has been
- *    deleted. The only way to find out that a shred folder is deleted
- *    is to notice that it is not enumerated any more. Thus an explicit
- *    "end of list" notification is needed. "sharedFolder == NULL" notifies
- *    that enumeration is completed which allows to delete all shared
- *    folders that were not mentioned during current enumeration.
- *
- * Results:
- *    HgfsSharedFolderHandle for the entry.
- *
- * Side effects:
- *    May add an entry to known shared folders list.
- *
- *-----------------------------------------------------------------------------
- */
-
-static HgfsSharedFolderHandle
-HgfsServerRegisterShare(const char *shareName,   // IN: shared folder name
-                        const char *sharePath,   // IN: shared folder path
-                        Bool addFolder)          // IN: add or remove folder
-{
-   HgfsSharedFolderHandle result = HGFS_INVALID_FOLDER_HANDLE;
-   LOG(8, ("%s: %s, %s, %s exit %#x\n",__FUNCTION__,
-           (shareName ? shareName : "NULL"), (sharePath ? sharePath : "NULL"),
-           (addFolder ? "add" : "remove"), result));
-   return result;
-}
-
-
 /*
  *-----------------------------------------------------------------------------
  *
index dc9a0c6211e2eb8333e284d4a6c69733a8aabced..5fca4596223d4521f43d4df8d9e388a407056c4f 100644 (file)
@@ -134,9 +134,6 @@ typedef struct HgfsServerConfig {
 typedef uint32 HgfsSharedFolderHandle;
 #define HGFS_INVALID_FOLDER_HANDLE         ((HgfsSharedFolderHandle)~((HgfsSharedFolderHandle)0))
 
-typedef HgfsSharedFolderHandle (*HgfsRegisterSharedFolderFunc)(const char *shareName,
-                                                               const char *sharePath,
-                                                               Bool addFolder);
 /*
  * Callback functions to enumerate the share resources.
  * Filled in by the HGFS server policy and passed in to the HGFS server
@@ -197,9 +194,9 @@ typedef struct HgfsServerSessionCallbacks {
    void (*sendComplete)(HgfsPacket *, void *);
 } HgfsServerSessionCallbacks;
 
+/* XXX: TODO delete this layer if no other non-session callbacks are required. */
 typedef struct HgfsServerCallbacks {
    HgfsServerSessionCallbacks session;
-   HgfsRegisterSharedFolderFunc registerShare;
 } HgfsServerCallbacks;
 
 Bool HgfsServer_InitState(const HgfsServerCallbacks **,