[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-users] Re: sntp netconn
From: |
Martin Velek |
Subject: |
[lwip-users] Re: sntp netconn |
Date: |
Fri, 9 Oct 2009 14:49:36 +0200 |
Hi,
here is a update of sntp_netconn.c. There was a bug, if some of "if
statement" was false before calling "receiveUDPNetBuf =
netconn_recv(sendUDPNetConn);", it could lead to crash because at the
end was "netbuf_delete(receiveUDPNetBuf);" - receiveUDPNetBuf was
uninitialized with random value. The same case was also for
"netbuf_delete(sendUDPNetBuf), netconn_delete(sendUDPNetConn)"
I am sorry.
Regards,
Martin
2009/10/8 Martin Velek <address@hidden>:
> Hi,
>
> if you are insterested in, here is a rewritten contrib socket sntp
> client example to use netconn api.
>
> I have test it against WinXP with lwip 1.3.1 on LM3S9b92. You have to
> define SNTP_SERVER_ADDRESS variable and LWIP_SO_RCVTIMEO to enable
> UDP timeout.
>
> A piece of customization(e.g. remove calling syslog function, improve
> english) should be done.
>
> Martin
>
sntp_netconn.c
Description: Text Data