File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -349,9 +349,6 @@ void LoRaWANNode::clearSession() {
349349 // revert to default Class A
350350 this ->lwClass = RADIOLIB_LORAWAN_CLASS_A;
351351
352- // set a seed for the pseudo-rng using a truly random value from radio noise
353- srand (this ->phyLayer ->random (INT32_MAX));
354-
355352 // reset all channels
356353 memset (this ->channels , 0 , sizeof (this ->channels ));
357354 memset (this ->dynamicChannels , 0 , sizeof (this ->dynamicChannels ));
@@ -365,7 +362,10 @@ void LoRaWANNode::clearSession() {
365362 this ->sessionStatus = RADIOLIB_LORAWAN_SESSION_NONE;
366363}
367364
368- void LoRaWANNode::createSession () {
365+ void LoRaWANNode::createSession () {
366+ // set a seed for the pseudo-rng using a truly random value from radio noise
367+ srand (this ->phyLayer ->random (INT32_MAX));
368+
369369 // setup default channels
370370 if (this ->band ->bandType == RADIOLIB_LORAWAN_BAND_DYNAMIC) {
371371 for (int num = 0 ; num < 3 ; num++) {
You can’t perform that action at this time.
0 commit comments