Skip to content

Commit e3e0c12

Browse files
committed
Check ["rtcmCredentials"]["endpoint"] exists. ["rtcmCredentials"] alone fails
1 parent 7797280 commit e3e0c12

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Firmware/RTK_Everywhere/HTTP_Client.ino

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -622,13 +622,15 @@ void httpClientUpdate()
622622
else if (pointPerfectNtripNeeded() == true)
623623
{
624624
// We received a JSON blob containing NTRIP credentials
625+
// Note: this prints the userName and password, which should probably be kept secret?
626+
// TODO: comment this
625627
systemPrintf("PointPerfect response: %s\r\n", response.c_str());
626628

627629
// Check if the JSON blob contains rtcmCredentials
628630
// If this is the first time this device has connected to ThingStream, rtcmCredentials
629-
// will not be present and we need to retry
631+
// endpoint will not be present and we need to retry
630632
// httpClientConnectLimitReached will prevent excessive retries
631-
if ((const char *)((*jsonZtp)["rtcmCredentials"]) == nullptr)
633+
if ((const char *)((*jsonZtp)["rtcmCredentials"]["endpoint"]) == nullptr)
632634
{
633635
systemPrintln("ERROR - rtcmCredentials not found!\r\n");
634636
httpClientRestart(); // Try again - allow time for ThingStream to finish activating the device on plan

0 commit comments

Comments
 (0)