~ubuntu-branches/ubuntu/quantal/open-vm-tools/quantal-201210021442

« back to all changes in this revision

Viewing changes to lib/file/fileLockPrimitive.c

  • Committer: Package Import Robot
  • Author(s): Nate Muench
  • Date: 2012-06-20 15:59:51 UTC
  • mfrom: (1.4.8)
  • Revision ID: package-import@ubuntu.com-20120620155951-6rupmpb0f70b52zr
Tags: 2012.05.21-724730-0ubuntu1
* Merging upstream version 2012.05.21-724730.
  - Fixes building against the current Quantal kernel. (LP: #1000344)
  - Fixes Quantal installation issues. (LP: #1019031)

* Sync with Debian
  - Updating to debhelper version 9.
  - Updating to standards version 3.9.3.
  - Updating copyright file machine-readable format version 1.0.
  - Building without multiarch paths for now

Show diffs side-by-side

added added

removed removed

Lines of Context:
785
785
         /* Remove any stale locking files */
786
786
         if (FileLockMachineIDMatch(myValues->machineID,
787
787
                                    memberValues.machineID)) {
788
 
            char *dispose = NULL;
 
788
            Unicode dispose = NULL;
789
789
 
790
790
            if (FileLockValidExecutionID(memberValues.executionID)) {
791
791
               /* If it's mine it better still be where I put it! */
793
793
                   ((memberValues.locationChecksum != NULL) &&
794
794
                    (strcmp(memberValues.locationChecksum,
795
795
                            locationChecksum) != 0))) {
796
 
                  dispose = "lock file has been moved.";
 
796
                  dispose = Unicode_Duplicate("lock file has been moved.");
797
797
               }
798
798
            } else {
799
 
               dispose = "invalid executionID.";
 
799
               dispose = Str_SafeAsprintf(NULL, "invalid executionID %s.",
 
800
                                          memberValues.executionID);
800
801
            }
801
802
 
802
803
            if (dispose) {
803
804
               Log(LGPFX" %s discarding %s from %s': %s\n",
804
805
                   __FUNCTION__, UTF8(fileList[i]), UTF8(lockDir), dispose);
805
806
 
 
807
               Unicode_Free(dispose);
806
808
               Unicode_Free(memberValues.memberName);
807
809
 
808
810
               err = FileLockRemoveLockingFile(lockDir, fileList[i]);
1831
1833
   lockBase = Unicode_Append(pathName, FILELOCK_SUFFIX);
1832
1834
 
1833
1835
   myValues.lockType = exclusivity ? LOCK_EXCLUSIVE : LOCK_SHARED;
 
1836
   myValues.exclusivity = exclusivity;
1834
1837
   myValues.waitTime = 0;
1835
1838
   myValues.msecMaxWaitTime = msecMaxWaitTime;
1836
1839