From 0521012ffc35d67b9befb58467c23056f16ee0a7 Mon Sep 17 00:00:00 2001 From: Ludovic Chenut Date: Thu, 7 Mar 2024 17:18:49 +0100 Subject: [PATCH] fix sctp wrong addr call & remove gcsafe --- webrtc/dtls/dtls.nim | 4 ++-- webrtc/sctp.nim | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/webrtc/dtls/dtls.nim b/webrtc/dtls/dtls.nim index fae1cae..b09a888 100644 --- a/webrtc/dtls/dtls.nim +++ b/webrtc/dtls/dtls.nim @@ -284,7 +284,7 @@ proc removeConnection(self: Dtls, conn: DtlsConn, raddr: TransportAddress) {.asy await conn.join() self.connections.del(raddr) -proc accept*(self: Dtls): Future[DtlsConn] {.async, gcsafe.} = +proc accept*(self: Dtls): Future[DtlsConn] {.async.} = var selfvar = self res = DtlsConn() @@ -333,7 +333,7 @@ proc accept*(self: Dtls): Future[DtlsConn] {.async, gcsafe.} = continue return res -proc connect*(self: Dtls, raddr: TransportAddress): Future[DtlsConn] {.async, gcsafe.} = +proc connect*(self: Dtls, raddr: TransportAddress): Future[DtlsConn] {.async.} = var selfvar = self res = DtlsConn() diff --git a/webrtc/sctp.nim b/webrtc/sctp.nim index 31a4b8b..91a7cf3 100644 --- a/webrtc/sctp.nim +++ b/webrtc/sctp.nim @@ -159,7 +159,7 @@ proc write*(self: SctpConn, buf: seq[byte], self.sctpSocket.usrsctp_sendv(cast[pointer](addr cpy[0]), cpy.len().uint, nil, 0, nil, 0, SCTP_SENDV_NOINFO.cuint, 0) else: - let sendInfo = sctp_sndinfo( + var sendInfo = sctp_sndinfo( snd_sid: sendParams.streamId, # TODO: swapBytes => htonl? snd_ppid: sendParams.protocolId.swapBytes(),