Skip to content

Commit 9e5b37d

Browse files
committed
Return PointPerfect cert arrays to global
Until we can figure out why malloc is not working.
1 parent 6b5eb47 commit 9e5b37d

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

Firmware/RTK_Surveyor/RTK_Surveyor.ino

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,10 @@ LoggingType loggingType = LOGGING_UNKNOWN;
159159

160160
#endif
161161

162-
char *certificateContents; //Holds the contents of the keys prior to MQTT connection
163-
char *keyContents;
162+
//char *certificateContents; //Holds the contents of the keys prior to MQTT connection
163+
//char *keyContents;
164+
char certificateContents[2000]; //Holds the contents of the keys prior to MQTT connection
165+
char keyContents[2000];
164166
//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
165167

166168
//GNSS configuration

Firmware/RTK_Surveyor/menuPP.ino

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -286,13 +286,13 @@ bool updatePointPerfectKeys()
286286

287287
#define CONTENT_SIZE 2000
288288

289-
certificateContents = (char*)malloc(CONTENT_SIZE);
290-
memset(certificateContents, 0, CONTENT_SIZE);
289+
//certificateContents = (char*)malloc(CONTENT_SIZE);
290+
//memset(certificateContents, 0, CONTENT_SIZE);
291291
loadFile("certificate", certificateContents);
292292
secureClient.setCertificate(certificateContents);
293293

294-
keyContents = (char*)malloc(CONTENT_SIZE);
295-
memset(keyContents, 0, CONTENT_SIZE);
294+
//keyContents = (char*)malloc(CONTENT_SIZE);
295+
//memset(keyContents, 0, CONTENT_SIZE);
296296
loadFile("privateKey", keyContents);
297297
secureClient.setPrivateKey(keyContents);
298298

0 commit comments

Comments
 (0)