@@ -483,7 +483,7 @@ template<class Network, class Timer, int a, int b>
483
483
int MQTTSN::Client<Network, Timer, a, b>::yield(unsigned long timeout_ms)
484
484
{
485
485
int rc = SUCCESS;
486
- Timer timer = Timer () ;
486
+ Timer timer;
487
487
488
488
timer.countdown_ms (timeout_ms);
489
489
while (!timer.expired ())
@@ -610,7 +610,7 @@ int MQTTSN::Client<Network, Timer, MAX_PACKET_SIZE, b>::keepalive()
610
610
if (!ping_outstanding)
611
611
{
612
612
MQTTSNString clientid = MQTTSNString_initializer;
613
- Timer timer = Timer (1000 );
613
+ Timer timer (1000 );
614
614
int len = MQTTSNSerialize_pingreq (sendbuf, MAX_PACKET_SIZE, clientid);
615
615
if (len > 0 && (rc = sendPacket (len, timer)) == SUCCESS) // send the ping packet
616
616
ping_outstanding = true ;
@@ -642,7 +642,7 @@ int MQTTSN::Client<Network, Timer, a, b>::waitfor(int packet_type, Timer& timer)
642
642
template <class Network , class Timer , int MAX_PACKET_SIZE, int b>
643
643
int MQTTSN::Client<Network, Timer, MAX_PACKET_SIZE, b>::connect(MQTTSNPacket_connectData& options)
644
644
{
645
- Timer connect_timer = Timer (command_timeout_ms);
645
+ Timer connect_timer (command_timeout_ms);
646
646
int rc = FAILURE;
647
647
int len = 0 ;
648
648
@@ -709,7 +709,7 @@ template<class Network, class Timer, int MAX_PACKET_SIZE, int MAX_MESSAGE_HANDLE
709
709
int MQTTSN::Client<Network, Timer, MAX_PACKET_SIZE, MAX_MESSAGE_HANDLERS>::subscribe(MQTTSN_topicid& topicFilter, enum QoS qos, messageHandler messageHandler)
710
710
{
711
711
int rc = FAILURE;
712
- Timer timer = Timer (command_timeout_ms);
712
+ Timer timer (command_timeout_ms);
713
713
int len = 0 ;
714
714
715
715
if (!isconnected)
@@ -775,7 +775,7 @@ template<class Network, class Timer, int MAX_PACKET_SIZE, int MAX_MESSAGE_HANDLE
775
775
int MQTTSN::Client<Network, Timer, MAX_PACKET_SIZE, MAX_MESSAGE_HANDLERS>::unsubscribe(MQTTSN_topicid& topicFilter)
776
776
{
777
777
int rc = FAILURE;
778
- Timer timer = Timer (command_timeout_ms);
778
+ Timer timer (command_timeout_ms);
779
779
int len = 0 ;
780
780
781
781
if (!isconnected)
@@ -854,7 +854,7 @@ template<class Network, class Timer, int MAX_PACKET_SIZE, int b>
854
854
int MQTTSN::Client<Network, Timer, MAX_PACKET_SIZE, b>::publish(MQTTSN_topicid& topic, void * payload, size_t payloadlen, unsigned short & id, enum QoS qos, bool retained)
855
855
{
856
856
int rc = FAILURE;
857
- Timer timer = Timer (command_timeout_ms);
857
+ Timer timer (command_timeout_ms);
858
858
int len = 0 ;
859
859
860
860
if (!isconnected)
@@ -908,7 +908,7 @@ template<class Network, class Timer, int MAX_PACKET_SIZE, int b>
908
908
int MQTTSN::Client<Network, Timer, MAX_PACKET_SIZE, b>::disconnect(unsigned short duration)
909
909
{
910
910
int rc = FAILURE;
911
- Timer timer = Timer (command_timeout_ms); // we might wait for incomplete incoming publishes to complete
911
+ Timer timer (command_timeout_ms); // we might wait for incomplete incoming publishes to complete
912
912
int int_duration = (duration == 0 ) ? -1 : (int )duration;
913
913
int len = MQTTSNSerialize_disconnect (sendbuf, MAX_PACKET_SIZE, int_duration);
914
914
if (len > 0 )
0 commit comments