Skip to content

Commit

Permalink
fix sctp wrong addr call & remove gcsafe
Browse files Browse the repository at this point in the history
  • Loading branch information
lchenut committed Mar 7, 2024
1 parent 56ca60c commit 0521012
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions webrtc/dtls/dtls.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion webrtc/sctp.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down

0 comments on commit 0521012

Please sign in to comment.