mirror of
https://github.com/mutouyun/cpp-ipc.git
synced 2026-01-01 03:12:13 +08:00
fix(log): fix Windows platform compilation errors
- src/libipc/platform/win/get_sa.h: * Fix malformed log.error() calls on lines 19 and 23 * Remove extra comma and parenthesis: GetLastError(, -> GetLastError() * Fix closing parenthesis and bracket placement * Line 19: GetLastError(, "]"))) -> GetLastError()), "]" * Line 23: GetLastError(, "]"))) -> GetLastError()), "]" - src/libipc/platform/win/mutex.h: * Add missing LIBIPC_LOG() to try_lock() function at line 84 * The function uses log.error() at line 95 and needs logger initialization These fixes resolve Windows compilation errors related to malformed log calls and missing LIBIPC_LOG() macro.
This commit is contained in:
parent
0f8bd3415c
commit
66a66f15ec
@ -16,11 +16,11 @@ inline LPSECURITY_ATTRIBUTES get_sa() {
|
||||
|
||||
initiator() {
|
||||
if (!::InitializeSecurityDescriptor(&sd_, SECURITY_DESCRIPTOR_REVISION)) {
|
||||
log.error("fail InitializeSecurityDescriptor[", static_cast<int>(::GetLastError(, "]")));
|
||||
log.error("fail InitializeSecurityDescriptor[", static_cast<int>(::GetLastError()), "]");
|
||||
return;
|
||||
}
|
||||
if (!::SetSecurityDescriptorDacl(&sd_, TRUE, NULL, FALSE)) {
|
||||
log.error("fail SetSecurityDescriptorDacl[", static_cast<int>(::GetLastError(, "]")));
|
||||
log.error("fail SetSecurityDescriptorDacl[", static_cast<int>(::GetLastError()), "]");
|
||||
return;
|
||||
}
|
||||
sa_.nLength = sizeof(SECURITY_ATTRIBUTES);
|
||||
|
||||
@ -82,6 +82,7 @@ public:
|
||||
}
|
||||
|
||||
bool try_lock() noexcept(false) {
|
||||
LIBIPC_LOG();
|
||||
DWORD ret = ::WaitForSingleObject(h_, 0);
|
||||
switch (ret) {
|
||||
case WAIT_OBJECT_0:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user