Skip to content

Commit

Permalink
Fix FFI API change bug after the merge with master
Browse files Browse the repository at this point in the history
  • Loading branch information
inetic committed Sep 9, 2024
1 parent 3f41a6c commit 5aa8e8c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ public class OuisyncClient {
onReceive(Array(UnsafeBufferPointer(start: dataPointer, count: Int(exactly: size)!)))
}

let result = ffi.ffiSessionCreate(ffi.sessionKindShared, configPath, logPath, OuisyncFFI.toUnretainedPtr(obj: client), callback);
let logTag = "ouisync-backend"
let result = ffi.ffiSessionCreate(ffi.sessionKindShared, configPath, logPath, logTag, OuisyncFFI.toUnretainedPtr(obj: client), callback);

if result.errorCode != 0 {
throw SessionCreateError("Failed to create session, code:\(result.errorCode), message:\(result.errorMessage!)")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import OuisyncLibFFI
typealias FFISessionKind = UInt8
typealias FFIContext = UnsafeRawPointer
typealias FFICallback = @convention(c) (FFIContext?, UnsafePointer<UInt8>, CUnsignedLongLong) -> Void;
typealias FFISessionCreate = @convention(c) (FFISessionKind, UnsafePointer<UInt8>, UnsafePointer<UInt8>, UnsafeRawPointer?, FFICallback) -> OuisyncSessionCreateResult;
typealias FFISessionCreate = @convention(c) (FFISessionKind, UnsafePointer<UInt8>, UnsafePointer<UInt8>, UnsafePointer<UInt8>, UnsafeRawPointer?, FFICallback) -> OuisyncSessionCreateResult;
typealias FFISessionGrab = @convention(c) (UnsafeRawPointer?, FFICallback) -> OuisyncSessionCreateResult;
typealias FFISessionClose = @convention(c) (OuisyncClientHandle, FFIContext?, FFICallback) -> Void;
typealias FFISessionChannelSend = @convention(c) (OuisyncClientHandle, UnsafeRawPointer, UInt64) -> Void;
Expand Down

0 comments on commit 5aa8e8c

Please sign in to comment.