Skip to content

Commit

Permalink
Cleanup logging
Browse files Browse the repository at this point in the history
  • Loading branch information
kaetemi committed Feb 24, 2023
1 parent e5559f1 commit baa450d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion ryzom/client/src/quic_connection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ class CQuicConnectionImpl
bool ReceiveEnable; // Set when datagrams may be received, otherwise they'll be ignored, this is to avoid stray messages after disconnecting (set and accessed by main thread only)
CAtomicInt MaxSendLength; // Set by the callback thread, used to check if we can send

// Send buffer, one being sent at a time, released as soon as it's sent out
CAtomicFlag SendBusy;
CBitMemStream SendBuffer;
QUIC_BUFFER SendQuicBuffer;
Expand Down Expand Up @@ -495,19 +496,21 @@ _Function_class_(QUIC_CONNECTION_CALLBACK)
break;
}
case QUIC_CONNECTION_EVENT_SHUTDOWN_INITIATED_BY_PEER: {
nlinfo("Shutdown initiated by peer");
m->ShuttingDownFlag.clear();
m->MaxSendLength = 0;
status = QUIC_STATUS_SUCCESS;
break;
}
case QUIC_CONNECTION_EVENT_SHUTDOWN_COMPLETE: {
nlinfo("Shutdown complete");
m->ShutdownFlag.clear();
m->MaxSendLength = 0;
status = QUIC_STATUS_SUCCESS;
break;
}
case QUIC_CONNECTION_EVENT_DATAGRAM_RECEIVED:
nlinfo("Datagram received");
nldebug("Datagram received");
// YES PLEASE
m->datagramReceived(ev->DATAGRAM_RECEIVED.Buffer->Buffer, ev->DATAGRAM_RECEIVED.Buffer->Length);
status = QUIC_STATUS_SUCCESS;
Expand Down
2 changes: 1 addition & 1 deletion ryzom/client/src/quic_connection.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ class CQuicConnection

/// Send a datagram, this swaps the buffer with the previous one sent
/// Only one datagram may be in flight at a time
bool sendDatagramSwap(NLMISC::CBitMemStream &buffer, uint32 size = 0);
bool sendDatagramSwap(NLMISC::CBitMemStream &buffer, uint32 size);

/// Check if any datagram has been received
bool datagramAvailable() const;
Expand Down

0 comments on commit baa450d

Please sign in to comment.