diff options
author | Michael Meskes <meskes@debian.org> | 2009-11-19 17:48:11 +0100 |
---|---|---|
committer | Michael Meskes <meskes@debian.org> | 2009-11-19 17:48:11 +0100 |
commit | fd892711c6bdc0ef96b6b3ea13b668cb2a38196e (patch) | |
tree | e6ec126da2bcd6a490d5661118630edf983580ec /src/VBox/Additions/common/VBoxService/VBoxServiceExec.cpp | |
parent | 8dc3a7e38d0783262b1aa8c3462e7359d8996d98 (diff) | |
parent | b35715c68a1bec309bc1990353e35c20a21d5c47 (diff) | |
download | virtualbox-debian/3.0.10-dfsg-2bpo50+1.tar.gz |
Merge branch 'master' into lennydebian/3.0.10-dfsg-2bpo50+1
Conflicts:
debian/changelog
Diffstat (limited to 'src/VBox/Additions/common/VBoxService/VBoxServiceExec.cpp')
-rw-r--r-- | src/VBox/Additions/common/VBoxService/VBoxServiceExec.cpp | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/src/VBox/Additions/common/VBoxService/VBoxServiceExec.cpp b/src/VBox/Additions/common/VBoxService/VBoxServiceExec.cpp index 4969ea2ce..8c5c8939f 100644 --- a/src/VBox/Additions/common/VBoxService/VBoxServiceExec.cpp +++ b/src/VBox/Additions/common/VBoxService/VBoxServiceExec.cpp @@ -136,7 +136,6 @@ static int VBoxServiceExecReadHostProp(const char *pszPropName, char **ppszValue size_t cbBuf = _1K; void *pvBuf = NULL; int rc; - *ppszValue = NULL; for (unsigned cTries = 0; cTries < 10; cTries++) @@ -199,7 +198,6 @@ static int VBoxServiceExecReadHostProp(const char *pszPropName, char **ppszValue *puTimestamp = uTimestamp; break; /* done */ } - RTMemFree(pvBuf); return rc; } @@ -398,9 +396,9 @@ DECLCALLBACK(int) VBoxServiceExecWorker(bool volatile *pfShutdown) /* * Store the result in Set return value so the host knows what happend. */ - rc = VbglR3GuestPropWriteValueF(g_uExecGuestPropSvcClientID, - "/VirtualBox/HostGuest/SysprepRet", - "%d", Status.iStatus); + rc = VBoxServiceWritePropF(g_uExecGuestPropSvcClientID, + "/VirtualBox/HostGuest/SysprepRet", + "%d", Status.iStatus); if (RT_FAILURE(rc)) VBoxServiceError("Exec: Failed to write SysprepRet: rc=%Rrc\n", rc); } @@ -436,10 +434,18 @@ DECLCALLBACK(int) VBoxServiceExecWorker(bool volatile *pfShutdown) && rc != VERR_FILE_NOT_FOUND) { VBoxServiceVerbose(1, "Exec: Stopping sysprep processing (rc=%Rrc)\n", rc); - rc = VbglR3GuestPropWriteValueF(g_uExecGuestPropSvcClientID, "/VirtualBox/HostGuest/SysprepVBoxRC", "%d", rc); + fSysprepDone = true; + } + + /* + * Always let the host know what happend, except when the guest property + * value is empty/missing. + */ + if (rc != VERR_NOT_FOUND) + { + rc = VBoxServiceWritePropF(g_uExecGuestPropSvcClientID, "/VirtualBox/HostGuest/SysprepVBoxRC", "%d", rc); if (RT_FAILURE(rc)) VBoxServiceError("Exec: Failed to write SysprepVBoxRC: rc=%Rrc\n", rc); - fSysprepDone = true; } } |