Skip to content

Commit b1fb3a5

Browse files
authored
Fix GreenGrass discovery (#55)
1 parent 5f363bb commit b1fb3a5

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

discovery/source/DiscoveryClient.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -124,12 +124,12 @@ namespace Aws
124124
DiscoverResponse response(jsonObject.View());
125125
onDiscoverResponse(&response, AWS_ERROR_SUCCESS, callbackContext->responseCode);
126126
}
127-
else if (errorCode)
128-
{
129-
onDiscoverResponse(nullptr, errorCode, callbackContext->responseCode);
130-
}
131127
else
132128
{
129+
if (!errorCode)
130+
{
131+
errorCode = AWS_ERROR_UNKNOWN;
132+
}
133133
onDiscoverResponse(nullptr, errorCode, callbackContext->responseCode);
134134
}
135135

samples/greengrass/basic_discovery/main.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ int main(int argc, char *argv[])
189189

190190
connection = mqttClient.NewConnection(
191191
Aws::Iot::MqttClientConnectionConfigBuilder(certificatePath.c_str(), keyPath.c_str())
192-
.WithCertificateAuthority(groupToUse.CAs->at(0).c_str())
192+
.WithCertificateAuthority(ByteCursorFromCString(groupToUse.CAs->at(0).c_str()))
193193
.WithPortOverride(connectivityInfo.Port.value())
194194
.WithEndpoint(connectivityInfo.HostAddress.value())
195195
.Build());

0 commit comments

Comments
 (0)