Skip to content

Commit 13aeaff

Browse files
authored
Fix spelling of OnConnectionInterupted (aws#14)
1 parent 23168a5 commit 13aeaff

File tree

5 files changed

+19
-19
lines changed

5 files changed

+19
-19
lines changed

include/aws/crt/crypto/HMAC.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ namespace Aws
2828
/**
2929
* Computes a SHA256 HMAC with secret over input, and writes the digest to output. If truncateTo is
3030
* non-zero, the digest will be truncated to the value of truncateTo. Returns true on success. If this
31-
* function fails, Aws::Crt::LastError() will contain the error that occured. Unless you're using
31+
* function fails, Aws::Crt::LastError() will contain the error that occurred. Unless you're using
3232
* 'truncateTo', output should have a minimum capacity of SHA256_HMAC_DIGEST_SIZE.
3333
*/
3434
bool AWS_CRT_CPP_API ComputeSHA256HMAC(
@@ -41,7 +41,7 @@ namespace Aws
4141
/**
4242
* Computes a SHA256 HMAC using the default allocator with secret over input, and writes the digest to
4343
* output. If truncateTo is non-zero, the digest will be truncated to the value of truncateTo. Returns true
44-
* on success. If this function fails, Aws::Crt::LastError() will contain the error that occured. Unless
44+
* on success. If this function fails, Aws::Crt::LastError() will contain the error that occurred. Unless
4545
* you're using 'truncateTo', output should have a minimum capacity of SHA256_HMAC_DIGEST_SIZE.
4646
*/
4747
bool AWS_CRT_CPP_API ComputeSHA256HMAC(
@@ -51,7 +51,7 @@ namespace Aws
5151
size_t truncateTo = 0) noexcept;
5252
/**
5353
* Streaming HMAC object. The typical use case is for computing the HMAC of an object that is too large to
54-
* load into memory. You can call Update() mutliple times as you load chunks of data into memory. When
54+
* load into memory. You can call Update() multiple times as you load chunks of data into memory. When
5555
* you're finished simply call Digest(). After Digest() is called, this object is no longer usable.
5656
*/
5757
class AWS_CRT_CPP_API HMAC final

include/aws/crt/crypto/Hash.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ namespace Aws
2929
/**
3030
* Computes a SHA256 Hash over input, and writes the digest to output. If truncateTo is non-zero, the digest
3131
* will be truncated to the value of truncateTo. Returns true on success. If this function fails,
32-
* Aws::Crt::LastError() will contain the error that occured. Unless you're using 'truncateTo', output
32+
* Aws::Crt::LastError() will contain the error that occurred. Unless you're using 'truncateTo', output
3333
* should have a minimum capacity of SHA256_DIGEST_SIZE.
3434
*/
3535
bool AWS_CRT_CPP_API ComputeSHA256(
@@ -41,7 +41,7 @@ namespace Aws
4141
/**
4242
* Computes a SHA256 Hash using the default allocator over input, and writes the digest to output. If
4343
* truncateTo is non-zero, the digest will be truncated to the value of truncateTo. Returns true on success.
44-
* If this function fails, Aws::Crt::LastError() will contain the error that occured. Unless you're using
44+
* If this function fails, Aws::Crt::LastError() will contain the error that occurred. Unless you're using
4545
* 'truncateTo', output should have a minimum capacity of SHA256_DIGEST_SIZE.
4646
*/
4747
bool AWS_CRT_CPP_API
@@ -50,7 +50,7 @@ namespace Aws
5050
/**
5151
* Computes a MD5 Hash over input, and writes the digest to output. If truncateTo is non-zero, the digest
5252
* will be truncated to the value of truncateTo. Returns true on success. If this function fails,
53-
* Aws::Crt::LastError() will contain the error that occured. Unless you're using 'truncateTo',
53+
* Aws::Crt::LastError() will contain the error that occurred. Unless you're using 'truncateTo',
5454
* output should have a minimum capacity of MD5_DIGEST_SIZE.
5555
*/
5656
bool AWS_CRT_CPP_API ComputeMD5(
@@ -62,14 +62,14 @@ namespace Aws
6262
/**
6363
* Computes a MD5 Hash using the default allocator over input, and writes the digest to output. If
6464
* truncateTo is non-zero, the digest will be truncated to the value of truncateTo. Returns true on success.
65-
* If this function fails, Aws::Crt::LastError() will contain the error that occured. Unless you're using
65+
* If this function fails, Aws::Crt::LastError() will contain the error that occurred. Unless you're using
6666
* 'truncateTo', output should have a minimum capacity of MD5_DIGEST_SIZE.
6767
*/
6868
bool AWS_CRT_CPP_API ComputeMD5(const ByteCursor &input, ByteBuf &output, size_t truncateTo = 0) noexcept;
6969

7070
/**
7171
* Streaming Hash object. The typical use case is for computing the hash of an object that is too large to
72-
* load into memory. You can call Update() mutliple times as you load chunks of data into memory. When
72+
* load into memory. You can call Update() multiple times as you load chunks of data into memory. When
7373
* you're finished simply call Digest(). After Digest() is called, this object is no longer usable.
7474
*/
7575
class AWS_CRT_CPP_API Hash final

include/aws/crt/mqtt/MqttClient.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ namespace Aws
4949
/**
5050
* Invoked Upon Connection loss.
5151
*/
52-
using OnConnectionInteruptedHandler = std::function<void(MqttConnection &connection, int error)>;
52+
using OnConnectionInterruptedHandler = std::function<void(MqttConnection &connection, int error)>;
5353

5454
/**
5555
* Invoked Upon Connection resumed.
@@ -58,7 +58,7 @@ namespace Aws
5858
std::function<void(MqttConnection &connection, ReturnCode connectCode, bool sessionPresent)>;
5959

6060
/**
61-
* Invoked when a connack message is received, or an error occured.
61+
* Invoked when a connack message is received, or an error occurred.
6262
*/
6363
using OnConnectionCompletedHandler = std::function<
6464
void(MqttConnection &connection, int errorCode, ReturnCode returnCode, bool sessionPresent)>;
@@ -141,7 +141,7 @@ namespace Aws
141141
bool Disconnect() noexcept;
142142

143143
/**
144-
* Subcribes to topicFilter. OnPublishRecievedHandler will be invoked from an event-loop
144+
* Subscribes to topicFilter. OnPublishReceivedHandler will be invoked from an event-loop
145145
* thread upon an incoming Publish message. OnSubAckHandler will be invoked
146146
* upon receipt of a suback message.
147147
*/
@@ -152,7 +152,7 @@ namespace Aws
152152
OnSubAckHandler &&onSubAck) noexcept;
153153

154154
/**
155-
* Subcribes to multiple topicFilters. OnPublishRecievedHandler will be invoked from an event-loop
155+
* Subscribes to multiple topicFilters. OnPublishReceivedHandler will be invoked from an event-loop
156156
* thread upon an incoming Publish message. OnMultiSubAckHandler will be invoked
157157
* upon receipt of a suback message.
158158
*/
@@ -183,7 +183,7 @@ namespace Aws
183183
*/
184184
void Ping();
185185

186-
OnConnectionInteruptedHandler OnConnectionInterupted;
186+
OnConnectionInterruptedHandler OnConnectionInterrupted;
187187
OnConnectionResumedHandler OnConnectionResumed;
188188
OnConnectionCompletedHandler OnConnectionCompleted;
189189
OnDisconnectHandler OnDisconnect;

samples/mqtt_pub_sub/main.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ int main(int argc, char *argv[])
170170

171171
/*
172172
* Since no exceptions are used, always check the bool operator
173-
* when an error could have occured.
173+
* when an error could have occurred.
174174
*/
175175
if (!mqttClient)
176176
{
@@ -224,7 +224,7 @@ int main(int argc, char *argv[])
224224
conditionVariable.notify_one();
225225
};
226226

227-
auto onInterupted = [&](Mqtt::MqttConnection &, int error) {
227+
auto onInterrupted = [&](Mqtt::MqttConnection &, int error) {
228228
fprintf(stdout, "Connection interrupted with error %s\n", ErrorDebugString(error));
229229
};
230230

@@ -244,7 +244,7 @@ int main(int argc, char *argv[])
244244

245245
connection->OnConnectionCompleted = std::move(onConnectionCompleted);
246246
connection->OnDisconnect = std::move(onDisconnect);
247-
connection->OnConnectionInterupted = std::move(onInterupted);
247+
connection->OnConnectionInterrupted = std::move(onInterrupted);
248248
connection->OnConnectionResumed = std::move(onResumed);
249249

250250
/*
@@ -288,7 +288,7 @@ int main(int argc, char *argv[])
288288
* This is invoked upon the receipt of a Publish on a subscribed topic.
289289
*/
290290
auto onPublish = [&](Mqtt::MqttConnection &, const String &topic, const ByteBuf &byteBuf) {
291-
fprintf(stdout, "Publish recieved on topic %s\n", topic.c_str());
291+
fprintf(stdout, "Publish received on topic %s\n", topic.c_str());
292292
fprintf(stdout, "\n Message:\n");
293293
fwrite(byteBuf.buffer, 1, byteBuf.len, stdout);
294294
fprintf(stdout, "\n");

source/mqtt/MqttClient.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ namespace Aws
2929
{
3030
auto connWrapper = reinterpret_cast<MqttConnection *>(userData);
3131
connWrapper->m_connectionState = ConnectionState::Connecting;
32-
if (connWrapper->OnConnectionInterupted)
32+
if (connWrapper->OnConnectionInterrupted)
3333
{
34-
connWrapper->OnConnectionInterupted(*connWrapper, errorCode);
34+
connWrapper->OnConnectionInterrupted(*connWrapper, errorCode);
3535
}
3636
}
3737

0 commit comments

Comments
 (0)