Skip to content

Commit

Permalink
fix(secure): Don't mix up PlayingSession and SimplePlayingSession
Browse files Browse the repository at this point in the history
lmao
  • Loading branch information
ashquarky committed Jul 15, 2024
1 parent 24d55e6 commit fa20014
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions nex/register_common_secure_server_protocols.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func CreateReportDBRecord(_ *types.PID, _ *types.PrimitiveU32, _ *types.QBuffer)
return nil
}

func stubGetPlayingSession(err error, packet nex.PacketInterface, callID uint32, lstPID *types.List[*types.PID]) (*nex.RMCMessage, *nex.Error) {
func stubGetPlayingSession(err error, packet nex.PacketInterface, callID uint32, _ *types.List[*types.PID]) (*nex.RMCMessage, *nex.Error) {
if err != nil {
globals.Logger.Error(err.Error())
return nil, nex.NewError(nex.ResultCodes.Core.InvalidArgument, "change_error")
Expand All @@ -33,16 +33,16 @@ func stubGetPlayingSession(err error, packet nex.PacketInterface, callID uint32,
connection := packet.Sender().(*nex.PRUDPConnection)
endpoint := connection.Endpoint().(*nex.PRUDPEndPoint)

lstSimplePlayingSession := types.NewList[*matchmakingtypes.SimplePlayingSession]()
lstPlayingSession := types.NewList[*matchmakingtypes.PlayingSession]()

// * There are no sessions, I tell you!
//for _, simplePlayingSession := range simplePlayingSessions {
// lstSimplePlayingSession.Append(simplePlayingSession)
//for _, playingSession := range playingSessions {
// lstPlayingSession.Append(playingSession)
//}

rmcResponseStream := nex.NewByteStreamOut(endpoint.LibraryVersions(), endpoint.ByteStreamSettings())

lstSimplePlayingSession.WriteTo(rmcResponseStream)
lstPlayingSession.WriteTo(rmcResponseStream)

rmcResponseBody := rmcResponseStream.Bytes()

Expand Down

0 comments on commit fa20014

Please sign in to comment.