]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
Don't crash when sources report is requested soon after start
authorMiroslav Lichvar <mlichvar@redhat.com>
Wed, 6 Apr 2011 14:59:40 +0000 (16:59 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Wed, 6 Apr 2011 14:59:40 +0000 (16:59 +0200)
sources.c

index a019f92af3b7970143b2cc5fcf48c6b42fce9057..3a82b2b45f9a04b91b1a1382567019905e01171d 100644 (file)
--- a/sources.c
+++ b/sources.c
@@ -1083,6 +1083,7 @@ SRC_ReportSource(int index, RPT_SourceReport *report, struct timeval *now)
       case SRC_JITTERY:
         report->state = RPT_JITTERY;
         break;
+      case SRC_OK:
       case SRC_BAD_STATS:
       case SRC_UNREACHABLE:
         report->state = RPT_UNREACH;