lasselukkari / aWOT

Arduino web server library.
MIT License
283 stars 41 forks source link

Express initialization to NULL of list tail pointers #5

Closed pablorodiz closed 7 years ago

pablorodiz commented 7 years ago

This is required in some platforms. At least on my compilation scenario for ESP8266 is tested to work, and does not hurt.

lasselukkari commented 7 years ago

Thanks for reporting this. I pushed some changes to the master. Please let me know if they fixed your problem. I also documented the router usage to the readme.

lasselukkari commented 7 years ago

Closing this one for now.

pablorodiz commented 7 years ago

Thanks for your changes, this was in fact the proper way to do it. Tested and working on my scenario. And sorry about the delay on testing and aswering but I had some health problems and I was entering and exiting the hospital from September the 1st.

sontono commented 7 years ago

Initializing pointers to null in the constructor is ok, but I think there are some unresolved cases. For example: I have an instance of the 'WebApp' class and it is using a not initialized 'm_headerTail' pointer (for example in the method WebApp::readHeader()). So I had to add initialization for that pointer in the WebApp constructor:

WebApp::WebApp() : m_headerTail(NULL), m_clientObject(NULL), @lasselukkari What do you think about? should I make a pull request with this issue? Thanks