aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sql/nms.sql2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/nms.sql b/sql/nms.sql
index 45d9e7b..002ae6b 100644
--- a/sql/nms.sql
+++ b/sql/nms.sql
@@ -105,7 +105,7 @@ BEGIN
num_entries := 0;
last_poll.switch := -1;
- FOR poll IN select * from polls where time >= now() - '15 minutes'::interval and time < now() order by switch,port,time LOOP
+ FOR poll IN select * from polls where time >= now() - '15 minutes'::interval and time < now() and official_port order by switch,port,time LOOP
IF poll.switch <> last_poll.switch OR poll.port <> last_poll.port THEN
IF num_entries >= 2 THEN
timediff := EXTRACT(epoch from last_poll.time - first_poll.time);