udhcpc[6]: show select timeout in log
authorDenys Vlasenko <vda.linux@googlemail.com>
Sat, 2 Jun 2012 21:53:53 +0000 (23:53 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Sat, 2 Jun 2012 21:53:53 +0000 (23:53 +0200)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
networking/udhcp/d6_dhcpc.c
networking/udhcp/dhcpc.c

index 7c9f52ae7de21ad39df69891f48c9eca8cfaafca..d9d8b9b565f4e0fd4a2c871a66e4981def962021 100644 (file)
@@ -1066,8 +1066,8 @@ int udhcpc6_main(int argc UNUSED_PARAM, char **argv)
                retval = 0;
                /* If we already timed out, fall through with retval = 0, else... */
                if ((int)tv.tv_sec > 0) {
+                       log1("Waiting on select %u seconds", (int)tv.tv_sec);
                        timestamp_before_wait = (unsigned)monotonic_sec();
-                       log1("Waiting on select...");
                        retval = select(max_fd + 1, &rfds, NULL, NULL, &tv);
                        if (retval < 0) {
                                /* EINTR? A signal was caught, don't panic */
index ddb328dd57de045045498652753df33c0dab6af3..4e7bd4bbce5cd07a33e1d849757a6a8a56f8ff26 100644 (file)
@@ -1362,8 +1362,8 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
                retval = 0;
                /* If we already timed out, fall through with retval = 0, else... */
                if ((int)tv.tv_sec > 0) {
+                       log1("Waiting on select %u seconds", (int)tv.tv_sec);
                        timestamp_before_wait = (unsigned)monotonic_sec();
-                       log1("Waiting on select...");
                        retval = select(max_fd + 1, &rfds, NULL, NULL, &tv);
                        if (retval < 0) {
                                /* EINTR? A signal was caught, don't panic */