src/oping.c: Allow shorter interval settings.
authorFlorian Forster <octo@leeloo.lan.home.verplant.org>
Thu, 12 Mar 2009 07:38:21 +0000 (08:38 +0100)
committerFlorian Forster <octo@leeloo.lan.home.verplant.org>
Thu, 12 Mar 2009 07:38:21 +0000 (08:38 +0100)
Previously, only 1/5s was allowed. Now everything down to 1/1000s is
accepted.

src/oping.c

index 4100caf..cfbe18a 100644 (file)
@@ -143,7 +143,10 @@ static int read_options (int argc, char **argv)
                                {
                                        double new_interval;
                                        new_interval = atof (optarg);
-                                       if (new_interval >= 0.2)
+                                       if (new_interval < 0.001)
+                                               fprintf (stderr, "Ignoring invalid interval %g.\n",
+                                                               new_interval);
+                                       else
                                                opt_interval = new_interval;
                                }
                                break;