Skip to content

Commit

Permalink
fix segfault in CS currentOpDescription log (#501)
Browse files Browse the repository at this point in the history
Signed-off-by: dorjesinpo <[email protected]>
  • Loading branch information
dorjesinpo authored Nov 6, 2024
1 parent 46bea6d commit c3031be
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/groups/mqb/mqba/mqba_clientsession.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -753,15 +753,19 @@ void ClientSession::onHandleConfiguredDispatched(

ClientSessionState::QueueStateMap::iterator queueStateIter =
d_queueSessionManager.queues().find(qId);

d_currentOpDescription << "Configure queue [qId=" << qId;

if (queueStateIter != d_queueSessionManager.queues().end()) {
d_currentOpDescription
<< "Configure queue '"
<< queueStateIter->second.d_handle_p->queue()->uri() << "'";
}
else {
d_currentOpDescription << "Configure queue [qId=" << qId << "]";
if (queueStateIter->second.d_handle_p) {
d_currentOpDescription
<< ", uri='"
<< queueStateIter->second.d_handle_p->queue()->uri() << "'";
}
}

d_currentOpDescription << "]";

if (isDisconnected()) {
// The client is disconnected or the channel is down
logOperationTime(d_currentOpDescription);
Expand Down

0 comments on commit c3031be

Please sign in to comment.