arduino-esp32/cores/esp32
Alexandre Trevizoli 25bd585c25
Corrections of Stream.Find, FindUntil and added FindMulti - like AVR-Core Libraries (#3442)
* Corrections of Find, FindUntil and FindMulti

Find has some bug that is not working with Ethernet.find() so, I copied code from Stream.h and Stream.cpp in AVR-CORE library and now it's working perfectly.
I don't know where was the error, but an Ethernet.find compiled to MEGA2560 was working but not working when compiled to esp32, after corrections of code (copy of AVR-Core libraries) it's working perfect.
So probably has some error on original ESP32-Core library.

Below is part of code that was working with MEGA2560 and not with ESP32 libraries.
client.find never return TRUE with ESP32 original library and with AVR it's works.

boolean esp32_fw_update(EthernetClient &client, DecodedHeader &header, const String &field_filename, const String &field_crc) {

  char bound[header.boundary.length()+3];
  char term[]="\r\n";
  
  strcpy(bound,header.boundary.c_str());
  strcat(bound,term);
  while (client.find(bound)) { 
    String line=client.readStringUntil('\r');

* Update Stream.h

* Update Stream.cpp

Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
2020-10-14 15:20:40 +03:00
..
apps/sntp
libb64 use libbase64 macro to calculate base64 length (#2007) 2018-11-19 17:01:38 +01:00
Arduino.h Fix clockCyclesPerMicrosecond Change from fixed value to current value (#3993) 2020-09-30 15:16:20 +03:00
base64.cpp Base64::encode : const correctness / String by reference passing (#3314) 2019-10-02 14:29:24 +03:00
base64.h
binary.h initial import 2016-10-06 07:09:44 -06:00
cbuf.cpp Fix cbuf not being able to hold the full length 2017-01-24 17:57:44 +02:00
cbuf.h initial import 2016-10-06 07:09:44 -06:00
Client.h Remove extra connects from Client.h (#3191) 2019-09-09 09:36:22 +03:00
esp32-hal-adc.c Use IDF's ADC Driver and Add analogReadMilliVolts (#3377) 2020-01-20 15:18:56 +02:00
esp32-hal-adc.h Use IDF's ADC Driver and Add analogReadMilliVolts (#3377) 2020-01-20 15:18:56 +02:00
esp32-hal-bt.c Fix BluetoothSerial crash when restart (#3471) 2019-11-11 18:31:09 +01:00
esp32-hal-bt.h
esp32-hal-cpu.c Fix Memory leak in addApbChangeCallback() (#3560) 2019-12-30 21:35:29 +02:00
esp32-hal-cpu.h Handle APB frequency change (#2250) 2019-01-09 10:07:54 +01:00
esp32-hal-dac.c Add analogRead, touchRead, dacWrite and updated esp-idf 2016-12-08 23:43:41 +02:00
esp32-hal-dac.h
esp32-hal-gpio.c bugfix(touchpad):swap touch8 and touch9 #3584 (#3620) 2020-01-09 08:11:40 +02:00
esp32-hal-gpio.h
esp32-hal-i2c.c
esp32-hal-i2c.h Wire ReSTART fix, with others (#1717) 2018-08-14 11:51:15 +02:00
esp32-hal-ledc.c Fix Memory leak in addApbChangeCallback() (#3560) 2019-12-30 21:35:29 +02:00
esp32-hal-ledc.h LEDC Driver Update 2017-01-09 18:05:30 +02:00
esp32-hal-log.h Update IDF to 3.2-3276a13 and esptool.py to 2.5.0 (#1878) 2018-09-21 08:39:36 +02:00
esp32-hal-matrix.c initial import 2016-10-06 07:09:44 -06:00
esp32-hal-matrix.h
esp32-hal-misc.c
esp32-hal-psram.c
esp32-hal-psram.h Add Wrover Support and Option to enable SPIRAM 2018-07-03 23:03:50 +02:00
esp32-hal-rmt.c Add an aditional (void *) arg to the RMT callback (much like Ticker() et.al.). (#3345) 2020-10-14 14:41:50 +03:00
esp32-hal-rmt.h
esp32-hal-sigmadelta.c Handle APB frequency change (#2250) 2019-01-09 10:07:54 +01:00
esp32-hal-sigmadelta.h fix renamed method names for SigmaDelta 2017-01-09 21:55:37 +02:00
esp32-hal-spi.c
esp32-hal-spi.h mismatched parameter names. Fixes #4310 (#4313) 2020-10-01 15:35:40 +03:00
esp32-hal-time.c Fixed so configTime will not crash if tcpip is not initialized (#3470) 2019-11-11 15:50:56 +01:00
esp32-hal-timer.c
esp32-hal-timer.h Initial Timers driver 2016-12-09 17:47:30 +02:00
esp32-hal-touch.c Change Touch interrupt allocator 2017-09-28 16:44:47 +08:00
esp32-hal-touch.h Add analogRead, touchRead, dacWrite and updated esp-idf 2016-12-08 23:43:41 +02:00
esp32-hal-uart.c fix hwSerial tx only flush (#4263) 2020-10-01 15:30:45 +03:00
esp32-hal-uart.h Added facility to invert the polarity of input UART bits. (#4200) 2020-10-01 13:58:48 +03:00
esp32-hal.h
esp8266-compat.h
Esp.cpp
Esp.h Use esp_partition_* functions in Updater.cpp (#3898) 2020-09-30 15:06:19 +03:00
FunctionalInterrupt.cpp
FunctionalInterrupt.h
HardwareSerial.cpp
HardwareSerial.h
IPAddress.cpp const correctness (#89) 2016-12-12 01:32:55 +02:00
IPAddress.h const correctness (#89) 2016-12-12 01:32:55 +02:00
IPv6Address.cpp
IPv6Address.h
main.cpp Make yield() overridable (#2991) 2019-10-04 12:49:39 +03:00
MD5Builder.cpp
MD5Builder.h
pgmspace.h Fix incorrect definition of FPSTR() and move from pgmspace.h to WString.h (#1371) (#2961) 2019-07-17 10:16:47 +03:00
Print.cpp Extend Print class for 64bit integers. (#3688) 2020-09-30 14:31:36 +03:00
Print.h
Printable.h initial import 2016-10-06 07:09:44 -06:00
Server.h Update IDF to aaf1239 (#1539) 2018-06-27 09:01:06 +02:00
stdlib_noniso.c
stdlib_noniso.h initial import 2016-10-06 07:09:44 -06:00
Stream.cpp Corrections of Stream.Find, FindUntil and added FindMulti - like AVR-Core Libraries (#3442) 2020-10-14 15:20:40 +03:00
Stream.h
StreamString.cpp StreamString SSO fix (#2736) 2019-05-11 11:16:05 +03:00
StreamString.h Convert the few remaining cr/lf files to use lf for eol. (#1316) 2018-04-16 16:34:39 +02:00
Udp.h initial import 2016-10-06 07:09:44 -06:00
WCharacter.h
wiring_private.h Do not include file that does not exist 2016-11-13 13:26:49 +02:00
wiring_pulse.c Enable pulseIn() (#140) 2017-01-20 21:49:17 +02:00
wiring_shift.c
WMath.cpp Greatly reduces error rate (half, or 0 zero errors, depends on in/out ranges) for round-trip mapping at the same performance. (#3655) 2020-09-30 14:28:51 +03:00
WString.cpp
WString.h