Skip to content

Commit b174b92

Browse files
committed
fix typo
Signed-off-by: Emelia Lei <[email protected]>
1 parent cef4a2d commit b174b92

5 files changed

+20
-22
lines changed

src/groups/bmq/bmqa/bmqa_session.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -247,9 +247,9 @@ int SessionUtil::createApplication(SessionImpl* sessionImpl)
247247
static bsls::AtomicInt s_sessionInstanceCount(0);
248248

249249
// Authentication Message
250-
bmqp_ctrlmsg::AuthenticationMessage authenticaionMessage;
250+
bmqp_ctrlmsg::AuthenticationMessage authenticationMessage;
251251
bmqp_ctrlmsg::AuthenticateRequest& ar =
252-
authenticaionMessage.makeAuthenticateRequest();
252+
authenticationMessage.makeAuthenticateRequest();
253253
bsl::string str = "username:password";
254254
ar.mechanism() = "basic";
255255
ar.data() = bsl::vector<char>(str.begin(), str.end()); // hexBinary
@@ -319,7 +319,7 @@ int SessionUtil::createApplication(SessionImpl* sessionImpl)
319319
sessionImpl->d_application_mp.load(
320320
new (*(sessionImpl->d_allocator_p))
321321
bmqimp::Application(options,
322-
authenticaionMessage,
322+
authenticationMessage,
323323
negotiationMessage,
324324
eventHandler,
325325
sessionImpl->d_allocator_p),

src/groups/bmq/bmqimp/bmqimp_application.t.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,14 @@ static void test1_breathingTest()
4545

4646
// Create a default application
4747
bmqt::SessionOptions options(bmqtst::TestHelperUtil::allocator());
48-
bmqp_ctrlmsg::AuthenticationMessage authenticaionMessage(
48+
bmqp_ctrlmsg::AuthenticationMessage authenticationMessage(
4949
bmqtst::TestHelperUtil::allocator());
5050
bmqp_ctrlmsg::NegotiationMessage negotiationMessage(
5151
bmqtst::TestHelperUtil::allocator());
5252
bmqimp::EventQueue::EventHandlerCallback emptyEventHandler;
5353

5454
bmqimp::Application obj(options,
55-
authenticaionMessage,
55+
authenticationMessage,
5656
negotiationMessage,
5757
emptyEventHandler,
5858
bmqtst::TestHelperUtil::allocator());
@@ -81,14 +81,14 @@ static void test2_startStopTest()
8181

8282
// Create a default application, make sure it can start/stop
8383
bmqt::SessionOptions options(bmqtst::TestHelperUtil::allocator());
84-
bmqp_ctrlmsg::AuthenticationMessage authenticaionMessage(
84+
bmqp_ctrlmsg::AuthenticationMessage authenticationMessage(
8585
bmqtst::TestHelperUtil::allocator());
8686
bmqp_ctrlmsg::NegotiationMessage negotiationMessage(
8787
bmqtst::TestHelperUtil::allocator());
8888
bmqimp::EventQueue::EventHandlerCallback emptyEventHandler;
8989

9090
bmqimp::Application obj(options,
91-
authenticaionMessage,
91+
authenticationMessage,
9292
negotiationMessage,
9393
emptyEventHandler,
9494
bmqtst::TestHelperUtil::allocator());
@@ -136,14 +136,14 @@ static void test3_startStopAsyncTest()
136136

137137
// Create a default application, make sure it can start/stop
138138
bmqt::SessionOptions options(bmqtst::TestHelperUtil::allocator());
139-
bmqp_ctrlmsg::AuthenticationMessage authenticaionMessage(
139+
bmqp_ctrlmsg::AuthenticationMessage authenticationMessage(
140140
bmqtst::TestHelperUtil::allocator());
141141
bmqp_ctrlmsg::NegotiationMessage negotiationMessage(
142142
bmqtst::TestHelperUtil::allocator());
143143
bmqimp::EventQueue::EventHandlerCallback emptyEventHandler;
144144

145145
bmqimp::Application obj(options,
146-
authenticaionMessage,
146+
authenticationMessage,
147147
negotiationMessage,
148148
emptyEventHandler,
149149
bmqtst::TestHelperUtil::allocator());

src/groups/bmq/bmqimp/bmqimp_initialconnectionchannelfactory.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -362,11 +362,11 @@ int InitialConnectionChannelFactory::decodeInitialConnectionMessage(
362362
return bmqio::ChannelFactoryEvent::e_CONNECT_FAILED; // RETURN
363363
}
364364

365-
bmqp_ctrlmsg::AuthenticationMessage authenticaionMessage;
365+
bmqp_ctrlmsg::AuthenticationMessage authenticationMessage;
366366
bmqp_ctrlmsg::NegotiationMessage negotiationMessage;
367367

368368
if (event.isAuthenticationEvent()) {
369-
const int rc = event.loadAuthenticationEvent(&authenticaionMessage);
369+
const int rc = event.loadAuthenticationEvent(&authenticationMessage);
370370
if (rc != 0) {
371371
BALL_LOG_ERROR
372372
<< "Invalid response from broker [reason: 'authentication "
@@ -379,19 +379,19 @@ int InitialConnectionChannelFactory::decodeInitialConnectionMessage(
379379
return bmqio::ChannelFactoryEvent::e_CONNECT_FAILED; // RETURN
380380
}
381381

382-
if (!authenticaionMessage.isAuthenticateResponseValue()) {
382+
if (!authenticationMessage.isAuthenticateResponseValue()) {
383383
BALL_LOG_ERROR
384384
<< "Invalid response from broker [reason: 'authentication "
385385
<< "event is not an authenticationResponse']: "
386-
<< authenticaionMessage;
386+
<< authenticationMessage;
387387
bmqio::Status status(bmqio::StatusCategory::e_GENERIC_ERROR,
388388
"authenticationError",
389389
rc_INVALID_AUTHENTICATION_RESPONSE);
390390
cb(bmqio::ChannelFactoryEvent::e_CONNECT_FAILED, status, channel);
391391
return bmqio::ChannelFactoryEvent::e_CONNECT_FAILED; // RETURN
392392
}
393393

394-
*authenticationMsg = authenticaionMessage;
394+
*authenticationMsg = authenticationMessage;
395395
}
396396
else if (event.isControlEvent()) {
397397
const int rc = event.loadControlEvent(&negotiationMessage);

src/groups/mqb/mqba/mqba_authenticator.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ int Authenticator::sendAuthenticationMessage(
113113

114114
bmqp::EncodingType::Enum encodingType = bmqp::EncodingType::e_BER;
115115

116-
// TODO: why do we create a local allocator?
117116
bdlma::LocalSequentialAllocator<2048> localAllocator(d_allocator_p);
118117

119118
bmqp::SchemaEventBuilder builder(d_blobSpPool_p,

src/groups/mqb/mqba/mqba_initialconnectionhandler.cpp

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -246,11 +246,11 @@ int InitialConnectionHandler::decodeInitialConnectionMessage(
246246
return rc_INVALID_MESSAGE; // RETURN
247247
}
248248

249-
bmqp_ctrlmsg::AuthenticationMessage authenticaionMessage;
249+
bmqp_ctrlmsg::AuthenticationMessage authenticationMessage;
250250
bmqp_ctrlmsg::NegotiationMessage negotiationMessage;
251251

252252
if (event.isAuthenticationEvent()) {
253-
const int rc = event.loadAuthenticationEvent(&authenticaionMessage);
253+
const int rc = event.loadAuthenticationEvent(&authenticationMessage);
254254
if (rc != 0) {
255255
BALL_LOG_ERROR
256256
<< "Invalid response from broker [reason: 'authentication "
@@ -259,15 +259,14 @@ int InitialConnectionHandler::decodeInitialConnectionMessage(
259259
return rc_INVALID_AUTHENTICATION_EVENT; // RETURN
260260
}
261261

262-
*authenticationMsg = authenticaionMessage;
262+
*authenticationMsg = authenticationMessage;
263263
}
264264
else if (event.isControlEvent()) {
265265
const int rc = event.loadControlEvent(&negotiationMessage);
266266
if (rc != 0) {
267-
BALL_LOG_ERROR
268-
<< "Invalid response from broker [reason: 'authentication "
269-
"event is not an AuthenticationMessage', rc: "
270-
<< rc << "]: " << event;
267+
BALL_LOG_ERROR << "Invalid response from broker [reason: 'control "
268+
"event is not an NegotiationMessage', rc: "
269+
<< rc << "]: " << event;
271270

272271
return rc_INVALID_CONTROL_EVENT; // RETURN
273272
}

0 commit comments

Comments
 (0)