diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-05-21 07:05:06 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-05-21 07:05:06 +0000 |
commit | 6de8994440165e2f30c50d2d7c1f332d9cd649bd (patch) | |
tree | d1e2794c09b2b73e93e64c84444cb52806498494 /networking/udhcp/clientpacket.c | |
parent | 19903f0d447116baef455eddc14458b1dfd1c834 (diff) | |
download | busybox-w32-6de8994440165e2f30c50d2d7c1f332d9cd649bd.tar.gz busybox-w32-6de8994440165e2f30c50d2d7c1f332d9cd649bd.tar.bz2 busybox-w32-6de8994440165e2f30c50d2d7c1f332d9cd649bd.zip |
udhcpc: regularize the names of receiving functions,
pause on "serious failure to receive".
Some misc fixes are also folded in here.
Diffstat (limited to 'networking/udhcp/clientpacket.c')
-rw-r--r-- | networking/udhcp/clientpacket.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/networking/udhcp/clientpacket.c b/networking/udhcp/clientpacket.c index f826c1b94..c562c1200 100644 --- a/networking/udhcp/clientpacket.c +++ b/networking/udhcp/clientpacket.c | |||
@@ -175,7 +175,7 @@ int send_release(uint32_t server, uint32_t ciaddr) | |||
175 | 175 | ||
176 | 176 | ||
177 | /* Returns -1 on errors that are fatal for the socket, -2 for those that aren't */ | 177 | /* Returns -1 on errors that are fatal for the socket, -2 for those that aren't */ |
178 | int get_raw_packet(struct dhcpMessage *payload, int fd) | 178 | int udhcp_recv_raw_packet(struct dhcpMessage *payload, int fd) |
179 | { | 179 | { |
180 | int bytes; | 180 | int bytes; |
181 | struct udp_dhcp_packet packet; | 181 | struct udp_dhcp_packet packet; |
@@ -185,7 +185,7 @@ int get_raw_packet(struct dhcpMessage *payload, int fd) | |||
185 | bytes = safe_read(fd, &packet, sizeof(packet)); | 185 | bytes = safe_read(fd, &packet, sizeof(packet)); |
186 | if (bytes < 0) { | 186 | if (bytes < 0) { |
187 | DEBUG("Cannot read on raw listening socket - ignoring"); | 187 | DEBUG("Cannot read on raw listening socket - ignoring"); |
188 | sleep(1); /* possible down interface, looping condition */ | 188 | /* NB: possible down interface, etc. Caller should pause. */ |
189 | return bytes; /* returns -1 */ | 189 | return bytes; /* returns -1 */ |
190 | } | 190 | } |
191 | 191 | ||