From a311ddb9354883d740c78796e44025b31bf68782 Mon Sep 17 00:00:00 2001 From: Fred Gleason Date: Fri, 14 Feb 2020 19:20:58 -0500 Subject: [PATCH] 2020-02-14 Fred Gleason * Fixed a regression in the BroadcastTools SRC-16 switcher driver that could cause deadlocks and intermittent operation. --- ChangeLog | 3 +++ ripcd/btsrc16.cpp | 10 ++-------- ripcd/btsrc16.h | 3 +-- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8d36e906..dc1b097c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -19557,3 +19557,6 @@ 2020-02-14 Fred Gleason * Fixed a regression in the BroadcastTools GPI-16 switcher driver that could cause deadlocks and intermittent operation. +2020-02-14 Fred Gleason + * Fixed a regression in the BroadcastTools SRC-16 switcher driver + that could cause deadlocks and intermittent operation. diff --git a/ripcd/btsrc16.cpp b/ripcd/btsrc16.cpp index 0dc27ded..2c20e37b 100644 --- a/ripcd/btsrc16.cpp +++ b/ripcd/btsrc16.cpp @@ -2,7 +2,7 @@ // // A Rivendell switcher driver for the BroadcastTools SRC-16 // -// (C) Copyright 2002-2019 Fred Gleason +// (C) Copyright 2002-2020 Fred Gleason // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 as @@ -51,6 +51,7 @@ BtSrc16::BtSrc16(RDMatrix *matrix,QObject *parent) // RDTty *tty=new RDTty(rda->station()->name(),matrix->port(RDMatrix::Primary)); bt_device=new RDTTYDevice(); + connect(bt_device,SIGNAL(readyRead()),this,SLOT(processStatus())); if(tty->active()) { bt_device->setName(tty->port()); bt_device->setSpeed(tty->baudRate()); @@ -67,13 +68,6 @@ BtSrc16::BtSrc16(RDMatrix *matrix,QObject *parent) connect(bt_gpi_oneshot,SIGNAL(timeout(int)),this,SLOT(gpiOneshotData(int))); bt_gpo_oneshot=new RDOneShot(this); connect(bt_gpo_oneshot,SIGNAL(timeout(int)),this,SLOT(gpoOneshotData(int))); - - // - // The Poll Timer - // - QTimer *timer=new QTimer(this,"poll_timer"); - connect(timer,SIGNAL(timeout()),this,SLOT(processStatus())); - timer->start(BTSRC16_POLL_INTERVAL); } diff --git a/ripcd/btsrc16.h b/ripcd/btsrc16.h index b59d1c81..935778dd 100644 --- a/ripcd/btsrc16.h +++ b/ripcd/btsrc16.h @@ -2,7 +2,7 @@ // // A Rivendell switcher driver for the BroadcastTools SRC-16 // -// (C) Copyright 2002-2005,2010,2016 Fred Gleason +// (C) Copyright 2002-2020 Fred Gleason // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 as @@ -30,7 +30,6 @@ #include #define BTSRC16_UNIT_ID 0 -#define BTSRC16_POLL_INTERVAL 100 #define BTSRC16_GPIO_PINS 16 class BtSrc16 : public Switcher