diff options
Diffstat (limited to 'src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.cpp')
| -rw-r--r-- | src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.cpp | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.cpp b/src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.cpp index c162cbd70..37cc591ef 100644 --- a/src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.cpp +++ b/src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.cpp @@ -4,7 +4,7 @@ */ /* - * Copyright (C) 2009-2010 Oracle Corporation + * Copyright (C) 2009-2013 Oracle Corporation * * This file is part of VirtualBox Open Source Edition (OSE), as * available from http://www.virtualbox.org. This file is free software; @@ -308,13 +308,20 @@ static void vboxServiceFreeLAClientInfo(PVBOXSERVICELACLIENTINFO pClient) if (pClient) { if (pClient->pszName) + { RTStrFree(pClient->pszName); + pClient->pszName = NULL; + } if (pClient->pszLocation) + { RTStrFree(pClient->pszLocation); + pClient->pszLocation = NULL; + } if (pClient->pszDomain) + { RTStrFree(pClient->pszDomain); - - pClient = NULL; + pClient->pszDomain = NULL; + } } } @@ -382,7 +389,7 @@ static void vboxserviceVMInfoWriteFixedProperties(void) } #if defined(VBOX_WITH_DBUS) && defined(RT_OS_LINUX) /* Not yet for Solaris/FreeBSB. */ -/* +/* * Simple wrapper to work around compiler-specific va_list madness. */ static dbus_bool_t vboxService_dbus_message_get_args(DBusMessage *message, @@ -504,8 +511,8 @@ static int vboxserviceVMInfoWriteUsers(void) { char **ppszSessions; int cSessions; if ( (dbus_message_get_type(pMsgSessions) == DBUS_MESSAGE_TYPE_METHOD_CALL) - && vboxService_dbus_message_get_args(pReplySessions, &dbErr, DBUS_TYPE_ARRAY, - DBUS_TYPE_OBJECT_PATH, &ppszSessions, &cSessions, + && vboxService_dbus_message_get_args(pReplySessions, &dbErr, DBUS_TYPE_ARRAY, + DBUS_TYPE_OBJECT_PATH, &ppszSessions, &cSessions, DBUS_TYPE_INVALID /* Termination */)) { VBoxServiceVerbose(4, "ConsoleKit: retrieved %RU16 session(s)\n", cSessions); @@ -587,7 +594,7 @@ static int vboxserviceVMInfoWriteUsers(void) && ppwEntry->pw_uid >= uid_min /* Only respect users, not daemons etc. */ && ppwEntry->pw_name) { - VBoxServiceVerbose(4, "ConsoleKit: session '%s' -> %s (uid: %RU32)\n", + VBoxServiceVerbose(4, "ConsoleKit: session '%s' -> %s (uid: %RU32)\n", *ppszCurSession, ppwEntry->pw_name, uid); bool fFound = false; @@ -629,7 +636,7 @@ static int vboxserviceVMInfoWriteUsers(void) else { VBoxServiceError("ConsoleKit: unable to retrieve session parameters (msg type=%d): %s", - dbus_message_get_type(pMsgSessions), + dbus_message_get_type(pMsgSessions), dbus_error_is_set(&dbErr) ? dbErr.message : "No error information available\n"); } dbus_message_unref(pReplySessions); @@ -750,6 +757,8 @@ static int vboxserviceVMInfoWriteUsers(void) } if (pszUserList) RTStrFree(pszUserList); + + VBoxServiceVerbose(4, "Writing users returned with rc=%Rrc\n", rc); return rc; } @@ -1185,11 +1194,12 @@ DECLCALLBACK(int) VBoxServiceVMInfoWorker(bool volatile *pfShutdown) * works with VBox (latest) 4.1 and up. */ /* Check for new connection. */ - char *pszLAClientID; + char *pszLAClientID = NULL; int rc2 = VBoxServiceReadHostProp(g_uVMInfoGuestPropSvcClientID, g_pszLAActiveClient, true /* Read only */, &pszLAClientID, NULL /* Flags */, NULL /* Timestamp */); if (RT_SUCCESS(rc2)) { + AssertPtr(pszLAClientID); if (RTStrICmp(pszLAClientID, "0")) /* Is a client connected? */ { uint32_t uLAClientID = RTStrToInt32(pszLAClientID); @@ -1252,6 +1262,8 @@ DECLCALLBACK(int) VBoxServiceVMInfoWorker(bool volatile *pfShutdown) VBoxServiceError("VRDP: Querying connected location awareness client failed with rc=%Rrc\n", rc2); } + VBoxServiceVerbose(3, "VRDP: Handling location awareness done\n"); + /* * Flush all properties if we were restored. */ |
