From: VMware, Inc <> Date: Tue, 29 Mar 2011 20:01:06 +0000 (-0700) Subject: Unity: Fix the set desktop work area parser. X-Git-Tag: 2011.03.28-387002~58 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8a92197c33a707ffe6ba150d28ea438152702aaa;p=thirdparty%2Fopen-vm-tools.git Unity: Fix the set desktop work area parser. The desktop work area parser code was touched when it was factored out of lib/unity/unity.c to services/plugins/unity/unityTclo.cpp. This introduced a bug where the same work area was processed repeatedly rather than parsing subsequent work areas. Signed-off-by: Marcelo Vanzin --- diff --git a/open-vm-tools/services/plugins/unity/unityTclo.cpp b/open-vm-tools/services/plugins/unity/unityTclo.cpp index 1b8ff0485..d72ad5d15 100644 --- a/open-vm-tools/services/plugins/unity/unityTclo.cpp +++ b/open-vm-tools/services/plugins/unity/unityTclo.cpp @@ -435,6 +435,7 @@ gboolean UnityTcloSetDesktopWorkArea(RpcInData *data) // IN/OUT { Bool success = FALSE; + const char *argList; unsigned int count; unsigned int i; UnityRect *workAreas = NULL; @@ -477,8 +478,8 @@ UnityTcloSetDesktopWorkArea(RpcInData *data) // IN/OUT } } - for (i = 0; i < count; i++) { - const char *argList = strchr(data->args, ','); + for (argList = data->args, i = 0; i < count; i++) { + argList = strchr(argList, ','); if (!argList) { RPCIN_SETRETVALS(data, "Expected comma separated display list",