I have discovered a problem with the sntp-reference example from contrib (1.4.0 and in HEAD as far as I can see) and I'm not quite sure how to solve it.
The core of the problem seem to be that the pbuf allocated in sntp_request() doesn't get freed unless a response is received from the server, and that if there is no response the timeout-handler will trigger a new sntp_request() allocating another pbuf for the new request. If the ntp-server is out of reach for some reason this will eat all memory available.
I'm not sure what the proper way to handle this is, if I just free the pbuf in the timeout and the answer is received I imagine bad things could happen since the pbuf would be used by the udp-layer?
Should I add these kind of problems to the lwip-bugtracker or is there a separate bugtracker for contrib?
I'm not familiar enough with the udp-interface to make qualified guesses so my analysis of the problem might be wrong.
Best regards /Åke
----------------------------- Åke Forslund 0433-273296 NIBE AB Box 14 S-285 21 Markaryd Tel +46-(0)433-273296