]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Remove ASSERT. Close can be called twice on us.
authorVMware, Inc <>
Mon, 20 Sep 2010 17:58:00 +0000 (10:58 -0700)
committerMarcelo Vanzin <mvanzin@vmware.com>
Mon, 20 Sep 2010 17:58:00 +0000 (10:58 -0700)
Relax few asserts to DEVEL only.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
open-vm-tools/modules/freebsd/vmhgfs/bdhandler.c

index 6403c3fc405e8e9cda195086e313a1ad1cac2b05..a0160cb0537d51816da34e6dc7f07b1fa1d3c9b0 100644 (file)
@@ -64,7 +64,7 @@ HgfsBdChannelOpen(HgfsTransportChannel *channel) // IN: Channel
 {
    Bool ret;
 
-   ASSERT(channel->status == HGFS_CHANNEL_NOTCONNECTED);
+   ASSERT_DEVEL(channel->status == HGFS_CHANNEL_NOTCONNECTED);
 
    if ((ret = HgfsBd_OpenBackdoor((RpcOut **)&channel->priv))) {
       DEBUG(VM_DEBUG_INFO, "VMware hgfs: %s: backdoor opened.\n", __func__);
@@ -96,10 +96,13 @@ static void
 HgfsBdChannelClose(HgfsTransportChannel *channel) // IN: Channel
 {
    int ret;
-   ASSERT(channel->priv != NULL);
+
+   if (channel->priv == NULL) {
+      return;
+   }
 
    ret = HgfsBd_CloseBackdoor((RpcOut **)&channel->priv);
-   ASSERT(channel->priv == NULL);
+   ASSERT_DEVEL(channel->priv == NULL);
    if (!ret) {
       DEBUG(VM_DEBUG_FAIL, "VMware hgfs: %s: Failed to close backdoor.\n", __func__);
    } else {