]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Stop the glib based logging to avoid nested logging from RpcChannel error.
authorKruti <kpendharkar@vmware.com>
Fri, 3 May 2024 16:05:44 +0000 (09:05 -0700)
committerKruti <kpendharkar@vmware.com>
Fri, 3 May 2024 16:05:44 +0000 (09:05 -0700)
open-vm-tools/libvmtools/vmtoolsLog.c

index 3560080fc747b2412ebf20d5cc80dcf934c72f14..d5f41b6521363d5f7c33888ec96b7150a27d2c62 100644 (file)
@@ -1,5 +1,6 @@
 /*********************************************************
- * Copyright (c) 2008-2021 VMware, Inc. All rights reserved.
+ * Copyright (c) 2008-2021,2024 Broadcom. All rights reserved.
+ * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
  *
  * 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
@@ -2670,15 +2671,17 @@ VMTools_TeardownVmxGuestLog(void)
 
    /*
     * Acquire the same locks as VMTools_SetupVmxGuestLog.
+    * Stop the glib based logging to avoid nested logging
+    * from RpcChannel error.
     */
    VMTools_AcquireLogStateLock();
-
+   StopGlibLogging();
    g_rec_mutex_lock(&gVmxGuestLogMutex);
 
    DestroyRpcChannel();
 
    g_rec_mutex_unlock(&gVmxGuestLogMutex);
-
+   RestartGlibLogging();
    VMTools_ReleaseLogStateLock();
 }