5 Commits

Author SHA1 Message Date
Kenneth Finnegan
98ad16eff8 Correct buffer overflow and remove magic constants from esp8266 example
The msg[] array is defined as 50 bytes long, but then the snprintf is
protected at 75 bytes long, which is incorrectly 25 bytes longer than
the underlying array.

To correct this, define a new macro MSG_BUFFER_SIZE and use it in both
places:
 * defining msg[]
 * writing to msg[] with snprintf()
2017-04-25 20:43:54 -07:00
Kenneth Finnegan
b85f4dc35c Corrected time data types in esp8266 example
The millis() function returns unsigned longs, not longs.
2017-04-25 20:39:09 -07:00
Ivan Grokhotkov
33170273a9 Use random MQTT client ID in example sketch
Many users load the sketch having only changed WiFi SSID and password. When multiple users attempt to connect to the same broker using same client ID, they get rejected. Currently the chances of connecting to broker.mqtt-dashboard.com using "ESP8266Client" ID are fairly slim. This change adds a random number to the client ID, increasing chances of connection for new users of this library.
2016-06-14 19:10:15 +08:00
Nick O'Leary
35ead348e3 Fix esp8266 example 2016-02-13 21:23:48 +00:00
Nick O'Leary
aa9afc7b44 Fix esp example 2015-09-09 10:32:35 +01:00