summaryrefslogtreecommitdiff
path: root/net/sntp.c
diff options
context:
space:
mode:
authorJoe Hershberger <joe.hershberger@ni.com>2012-05-23 07:59:14 +0000
committerJoe Hershberger <joe.hershberger@ni.com>2012-05-23 17:46:21 -0500
commit22f6e99d5b0c54758646334c1153737a5585bd57 (patch)
treee70b3679ff62e93345fc0f7e3960d37582cea612 /net/sntp.c
parentadf5d93e441eb3eacd8c0430d6064b35d47ad2a5 (diff)
downloadu-boot-imx-22f6e99d5b0c54758646334c1153737a5585bd57.zip
u-boot-imx-22f6e99d5b0c54758646334c1153737a5585bd57.tar.gz
u-boot-imx-22f6e99d5b0c54758646334c1153737a5585bd57.tar.bz2
net: Refactor to protect access to the NetState variable
Changes to NetState now go through an accessor function called net_set_state() Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Diffstat (limited to 'net/sntp.c')
-rw-r--r--net/sntp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/sntp.c b/net/sntp.c
index 07d036d..48ce07f 100644
--- a/net/sntp.c
+++ b/net/sntp.c
@@ -45,7 +45,7 @@ static void
SntpTimeout(void)
{
puts("Timeout\n");
- NetState = NETLOOP_FAIL;
+ net_set_state(NETLOOP_FAIL);
return;
}
@@ -76,7 +76,7 @@ SntpHandler(uchar *pkt, unsigned dest, IPaddr_t sip, unsigned src,
tm.tm_year, tm.tm_mon, tm.tm_mday,
tm.tm_hour, tm.tm_min, tm.tm_sec);
- NetState = NETLOOP_SUCCESS;
+ net_set_state(NETLOOP_SUCCESS);
}
void