diff --git a/cpp/src/ffi_go/ir/serializer.cpp b/cpp/src/ffi_go/ir/serializer.cpp index 071a9cc..26e8e91 100644 --- a/cpp/src/ffi_go/ir/serializer.cpp +++ b/cpp/src/ffi_go/ir/serializer.cpp @@ -49,7 +49,7 @@ auto serializer_create( void*& ir_serializer_ptr, ByteSpan* ir_view ) -> int { - if (nullptr == ir_serializer_ptr || nullptr == ir_view) { + if (nullptr != ir_serializer_ptr || nullptr == ir_view) { return static_cast(std::errc::protocol_error); } auto result{clp::ffi::ir_stream::Serializer::create()}; @@ -66,6 +66,7 @@ auto serializer_create( return 0; } + template auto serialize_log_event(void* ir_serializer, ByteSpan msgpack_bytes, ByteSpan* ir_view) -> int { if (nullptr == ir_serializer || nullptr == ir_view) { @@ -78,7 +79,7 @@ auto serialize_log_event(void* ir_serializer, ByteSpan msgpack_bytes, ByteSpan* msgpack::unpack(static_cast(msgpack_bytes.m_data), msgpack_bytes.m_size) }; /* if (serializer->serialize_msgpack_map(mp_handle.get())) { */ - if (serializer->serialize_msgpack_map(mp_handle.get().via.map)) { + if (false == serializer->serialize_msgpack_map(mp_handle.get().via.map)) { return static_cast(std::errc::protocol_error); } diff --git a/ir/writeread_test.go b/ir/writeread_test.go index a814799..3e815d8 100644 --- a/ir/writeread_test.go +++ b/ir/writeread_test.go @@ -24,7 +24,7 @@ func testWriteReadLogMessages( } _, err := irWriter.WriteLogEvent(event) if nil != err { - t.Fatalf("ir.Writer.Write failed: %v", err) + t.Fatalf("ir.Writer.WriteLogEvent failed: %v", err) } events = append(events, event) } diff --git a/lib/libclp_ffi_linux_amd64.a b/lib/libclp_ffi_linux_amd64.a index 9f2b0fe..4b66dd4 100644 Binary files a/lib/libclp_ffi_linux_amd64.a and b/lib/libclp_ffi_linux_amd64.a differ