]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
HGFS: Fix the server to close sessions being invalidated
authorVMware, Inc <>
Wed, 18 Sep 2013 03:14:19 +0000 (20:14 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Mon, 23 Sep 2013 05:01:52 +0000 (22:01 -0700)
When the HGFS server running in the tools is left with any sessions
open due to the clients not terminating them cleanly they will be marked
inactive. The HGFS server callback to invalidate them will periodically
be called and after a brief period will terminate those sessions.
These sessions are not closed first, thus triggering the assert in the
session exit function which checks the session's state.

Fix is to close the inactive sessions being terminated in the HGFS
server invalidate callback.

Signed-off-by: Dmitry Torokhov <dtor@vmware.com>
open-vm-tools/lib/hgfsServer/hgfsServer.c

index b8eb50ad327c4af4280352f13eaec79b816a3631..508867a317c9e7cc328f931e618aec47df9cac73 100644 (file)
@@ -4747,6 +4747,9 @@ HgfsServerSessionInvalidateInactiveSessions(void *clientData)         // IN:
       if (session->isInactive) {
 
          if (session->numInvalidationAttempts == MAX_SESSION_INVALIDATION_ATTEMPTS) {
+            LOG(4, ("%s: closing inactive session %"FMT64"x\n", __FUNCTION__,
+                    session->sessionId));
+            session->state = HGFS_SESSION_STATE_CLOSED;
             HgfsServerTransportRemoveSessionFromList(transportSession,
                                                      session);
             /*