[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: [PATCH 07/19] udhcpc: make udhcpc silent after 3 'Sending discover ...' messages
From:       Frank TEO <frank128 () ymail ! com>
Date:       2012-09-28 4:34:24
Message-ID: 1348806864.81250.YahooMailNeo () web193206 ! mail ! sg3 ! yahoo ! com
[Download RAW message or body]

We should not suppress the message.
We should use it for validating dhcp retransmission purpose.

----- Original Message -----

From: Denys Vlasenko <vda.linux@googlemail.com>
To: Florian Fainelli <florian@alphacore.org>
Cc: busybox@busybox.net; Felix Fietkau <nbd@openwrt.org>
Sent: Thursday, 27 September 2012, 22:30
Subject: Re: [PATCH 07/19] udhcpc: make udhcpc silent after 3 'Sending discover ...' messages

On Tue, Sep 25, 2012 at 2:06 PM, Florian Fainelli <florian@alphacore.org> wrote:
> From: Felix Fietkau <nbd@openwrt.org>
>
> Signed-off-by: Felix Fietkau <nbd@openwrt.org>
> ---
>  networking/udhcp/dhcpc.c |    4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c
> index f72217c..f1013f4 100644
> --- a/networking/udhcp/dhcpc.c
> +++ b/networking/udhcp/dhcpc.c
> @@ -672,6 +672,7 @@ static int raw_bcast_from_client_config_ifindex(struct dhcp_packet *packet)
>  static NOINLINE int send_discover(uint32_t xid, uint32_t requested)
>  {
>         struct dhcp_packet packet;
> +       static int msgs = 0;

Why static?

>         /* Fill in: op, htype, hlen, cookie, chaddr fields,
>          * random xid field (we override it below),
> @@ -689,7 +690,8 @@ static NOINLINE int send_discover(uint32_t xid, uint32_t requested)
>          */
>         add_client_options(&packet);
>
> -       bb_info_msg("Sending discover...");
> +       if (msgs++ < 3)
> +               bb_info_msg("Sending discover...");
>         return raw_bcast_from_client_config_ifindex(&packet);
>  }

Why do you want to suppress the message?
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox

_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic