/*********************************************************
- * Copyright (C) 2010-2016 VMware, Inc. All rights reserved.
+ * Copyright (C) 2010-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
#include "vm_assert.h"
#include "vm_atomic.h"
#include "util.h"
-#if defined(VMTOOLS_USE_GLIB)
-#define G_LOG_DOMAIN "hgfsd"
-#define Debug g_debug
-#define Warning g_warning
-#include "vmware/tools/guestrpc.h"
-#include "vmware/tools/utils.h"
-// #include <glib.h>
-#else
-#include "debug.h"
-#endif
#include "hgfsChannelGuestInt.h"
#include "hgfsServer.h"
#include "hgfsServerManager.h"
/*********************************************************
- * Copyright (C) 2010-2016 VMware, Inc. All rights reserved.
+ * Copyright (C) 2010-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
#include "vm_assert.h"
#include "vm_atomic.h"
#include "util.h"
-#include "debug.h"
#include "hgfsChannelGuestInt.h"
#include "hgfsServer.h"
#include "hgfsServerManager.h"
/*********************************************************
- * Copyright (C) 2009-2016 VMware, Inc. All rights reserved.
+ * Copyright (C) 2009-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
#ifndef _HGFSCHANNELGUESTINT_H_
#define _HGFSCHANNELGUESTINT_H_
+#if defined(VMTOOLS_USE_GLIB)
+#define G_LOG_DOMAIN "hgfsd"
+#define Debug g_debug
+#define Warning g_warning
+#else
+#include "debug.h"
+#endif
#include "hgfsServer.h"
#include "hgfsServerManager.h"
/*********************************************************
- * Copyright (C) 2006,2014-2016 VMware, Inc. All rights reserved.
+ * Copyright (C) 2006,2014-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
char *packetOut, // OUT: rep
size_t *packetOutSize) // IN/OUT: rep buf/data size
{
+ Debug("%s: Processing Packet for %s.\n", __FUNCTION__, mgrData->appName);
/* Pass to the channel to handle processing and the server. */
return HgfsChannelGuest_Receive(mgrData,
packetIn,
ASSERT(data);
ASSERT(data->appName);
+ Debug("%s: Register %s.\n", __FUNCTION__, data->appName);
+
/*
* Passing NULL here is safe because the shares maintained by the guest
* policy server never change, invalidating the need for an invalidate
{
ASSERT(mgrData);
+ Debug("%s: Invalidate Inactive Sessions for %s.\n", __FUNCTION__,
+ mgrData->appName);
return HgfsChannelGuest_InvalidateInactiveSessions(mgrData);
}
HgfsServerManager_Unregister(HgfsServerMgrData *data) // IN: RpcIn channel
{
-
ASSERT(data);
ASSERT(data->appName != NULL);
+ Debug("%s: Unregister %s.\n", __FUNCTION__, data->appName);
+
HgfsChannelGuest_Exit(data);
HgfsServerPolicy_Cleanup();
memset(&gHgfsServerManagerGuestData, 0, sizeof gHgfsServerManagerGuestData);
/*********************************************************
- * 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
# include <stdlib.h>
#endif
+#undef LOG
+
+#define LGLEVEL (10)
+#define LGPFX_FMT "%s:%s:"
+#define LGPFX "hgfsd"
+
+#if defined VMTOOLS_USE_GLIB
+#define G_LOG_DOMAIN LGPFX
+#define Debug g_debug
+#define Warning g_warning
+#else
+#include "debug.h"
+#endif
+
+#define DOLOG(_min) ((_min) <= LGLEVEL)
+
+#define LOG(_level, args) \
+ do { \
+ if (DOLOG(_level)) { \
+ Debug(LGPFX_FMT, LGPFX, __FUNCTION__); \
+ Debug args; \
+ } \
+ } while (0)
+
+
#include "vmware.h"
#include "hgfsServerPolicy.h"
-/*
- * XXX: Transitioning over to the general tools logging mechanism.
- */
-#undef LOG
-#define LOG(level, args)
-
typedef struct HgfsServerPolicyState {
/*