Skip to content

Allow to use temporary strings in configTime#8606

Merged
d-a-v merged 2 commits into
esp8266:masterfrom
mcspr:sntp/private-strings
Jun 24, 2022
Merged

Allow to use temporary strings in configTime#8606
d-a-v merged 2 commits into
esp8266:masterfrom
mcspr:sntp/private-strings

Conversation

@mcspr
Copy link
Copy Markdown
Collaborator

@mcspr mcspr commented Jun 16, 2022

resolves #7056

in addition to the existing function, adds an overload accepting String
adds warning in the comment. not sure about older versions, but in ide 2.0 this will be displayed when hovering over the function call

although... there may be a confusion between F() and PSTR(). F() will be loaded into a static string, while PSTR() is const char ptr and uses the original function. at least with DNS, there's is a strlen call which will obviously fail

Comment thread cores/esp8266/time.cpp
Comment thread cores/esp8266/time.cpp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SNTP: configTime server cannot reference temporary char pointer

2 participants