Showing the changes to Source/Libraries/GSF.Core/Threading/InterprocessLock.cs (1 of 14 files). Show all
Unified · Split
| @@ -87,7 +87,7 @@ namespace GSF.Threading · 86 unmodified lines | ||
| 87 | 87 | // Create a mutex name that is specific to an object (e.g., a path and file name). |
| 88 | 88 | // Note that we use GetPasswordHash to create a short common name for the name parameter |
| 89 | 89 | // that was passed into the function - this allows the parameter to be very long, e.g., |
| 90 | − // a file path, and still meet minimum semaphore name requirements. | |
| 90 | + // a file path, and still meet minimum mutex name requirements. | |
| 91 | 91 | |
| 92 | 92 | // Prefix mutex name with "Global\" such that mutex will apply to all active |
| 93 | 93 | // application sessions in case terminal services is running. |
| @@ -211,7 +211,7 @@ namespace GSF.Threading · 117 unmodified lines | ||
| 211 | 211 | catch (UnauthorizedAccessException) |
| 212 | 212 | { |
| 213 | 213 | // Named semaphore exists now but current user doesn't have full control, attempt to open with minimum needed rights |
| 214 | − namedSemaphore = Semaphore.OpenExisting(name, SemaphoreRights.Synchronize | SemaphoreRights.Modify); | |
| 214 | + namedSemaphore = Semaphore.OpenExisting(semaphoreName, SemaphoreRights.Synchronize | SemaphoreRights.Modify); | |
| 215 | 215 | } |
| 216 | 216 | } |
| 217 | 217 | #endif |