]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Unity: Fix the set desktop work area parser.
authorVMware, Inc <>
Tue, 29 Mar 2011 20:01:06 +0000 (13:01 -0700)
committerMarcelo Vanzin <mvanzin@vmware.com>
Tue, 29 Mar 2011 20:01:06 +0000 (13:01 -0700)
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 <mvanzin@vmware.com>
open-vm-tools/services/plugins/unity/unityTclo.cpp

index 1b8ff04855b63277b2a4d6950a6bc8bea6b0c1fc..d72ad5d1516ec04985ed8c8f056639e85463ceab 100644 (file)
@@ -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",