@@ -510,27 +510,27 @@ void Adafruit_MQTT::processPackets(int16_t timeout) {
510
510
Adafruit_MQTT_Subscribe *Adafruit_MQTT::readSubscription (int16_t timeout) {
511
511
512
512
// Sync or Async subscriber with message
513
- Adafruit_MQTT_Subscribe* s=0 ;
513
+ Adafruit_MQTT_Subscribe * s=0 ;
514
514
515
515
// Check if are unread messages
516
516
for (uint8_t i = 0 ; i < MAXSUBSCRIPTIONS; i++) {
517
517
if (subscriptions[i] && subscriptions[i]->new_message ) {
518
- s= subscriptions[i];
518
+ s = subscriptions[i];
519
519
break ;
520
520
}
521
521
}
522
522
523
523
// not unread message
524
- if ( ! s ) {
524
+ if (!s ) {
525
525
// Check if data is available to read.
526
- uint16_t len =
527
- readFullPacket (buffer, MAXBUFFERSIZE, timeout); // return one full packet
528
- s= handleSubscriptionPacket (len);
526
+ uint16_t len = readFullPacket (buffer, MAXBUFFERSIZE,
527
+ timeout); // return one full packet
528
+ s = handleSubscriptionPacket (len);
529
529
}
530
530
531
531
// it there is a message, mark it as not pending
532
- if ( s ) {
533
- s->new_message = false ;
532
+ if (s ) {
533
+ s->new_message = false ;
534
534
}
535
535
536
536
return s;
@@ -573,12 +573,12 @@ Adafruit_MQTT_Subscribe *Adafruit_MQTT::handleSubscriptionPacket(uint16_t len) {
573
573
topiclen) == 0 ) {
574
574
DEBUG_PRINT (F (" Found sub #" ));
575
575
DEBUG_PRINTLN (i);
576
- if ( subscriptions[i]->new_message ) {
576
+ if (subscriptions[i]->new_message ) {
577
577
DEBUG_PRINTLN (F (" Lost previous message" ));
578
578
} else {
579
- subscriptions[i]->new_message = true ;
579
+ subscriptions[i]->new_message = true ;
580
580
}
581
-
581
+
582
582
break ;
583
583
}
584
584
}
0 commit comments