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/serverpacket.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/serverpacket.c')
-rw-r--r-- | networking/udhcp/serverpacket.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/networking/udhcp/serverpacket.c b/networking/udhcp/serverpacket.c index 1dc7233f2..fc6249725 100644 --- a/networking/udhcp/serverpacket.c +++ b/networking/udhcp/serverpacket.c | |||
@@ -67,12 +67,9 @@ static int send_packet_to_client(struct dhcpMessage *payload, int force_broadcas | |||
67 | /* send a dhcp packet, if force broadcast is set, the packet will be broadcast to the client */ | 67 | /* send a dhcp packet, if force broadcast is set, the packet will be broadcast to the client */ |
68 | static int send_packet(struct dhcpMessage *payload, int force_broadcast) | 68 | static int send_packet(struct dhcpMessage *payload, int force_broadcast) |
69 | { | 69 | { |
70 | int ret; | ||
71 | |||
72 | if (payload->giaddr) | 70 | if (payload->giaddr) |
73 | ret = send_packet_to_relay(payload); | 71 | return send_packet_to_relay(payload); |
74 | else ret = send_packet_to_client(payload, force_broadcast); | 72 | return send_packet_to_client(payload, force_broadcast); |
75 | return ret; | ||
76 | } | 73 | } |
77 | 74 | ||
78 | 75 | ||
@@ -100,7 +97,7 @@ static void add_bootp_options(struct dhcpMessage *packet) | |||
100 | 97 | ||
101 | 98 | ||
102 | /* send a DHCP OFFER to a DHCP DISCOVER */ | 99 | /* send a DHCP OFFER to a DHCP DISCOVER */ |
103 | int sendOffer(struct dhcpMessage *oldpacket) | 100 | int send_offer(struct dhcpMessage *oldpacket) |
104 | { | 101 | { |
105 | struct dhcpMessage packet; | 102 | struct dhcpMessage packet; |
106 | struct dhcpOfferedAddr *lease = NULL; | 103 | struct dhcpOfferedAddr *lease = NULL; |
@@ -188,7 +185,7 @@ int sendOffer(struct dhcpMessage *oldpacket) | |||
188 | } | 185 | } |
189 | 186 | ||
190 | 187 | ||
191 | int sendNAK(struct dhcpMessage *oldpacket) | 188 | int send_NAK(struct dhcpMessage *oldpacket) |
192 | { | 189 | { |
193 | struct dhcpMessage packet; | 190 | struct dhcpMessage packet; |
194 | 191 | ||
@@ -199,7 +196,7 @@ int sendNAK(struct dhcpMessage *oldpacket) | |||
199 | } | 196 | } |
200 | 197 | ||
201 | 198 | ||
202 | int sendACK(struct dhcpMessage *oldpacket, uint32_t yiaddr) | 199 | int send_ACK(struct dhcpMessage *oldpacket, uint32_t yiaddr) |
203 | { | 200 | { |
204 | struct dhcpMessage packet; | 201 | struct dhcpMessage packet; |
205 | struct option_set *curr; | 202 | struct option_set *curr; |