diff --git a/ChangeLog b/ChangeLog index b009ebc4..6b591c7d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -23574,3 +23574,6 @@ 'RDCatchEvent'. 2022-10-30 Fred Gleason * Reimplemented the 'PurgeEvent' command using 'RDCatchEvent'. +2022-10-30 Fred Gleason + * Fixed a regression in rdcatch(1) that caused status indication + to break for record events. diff --git a/rdcatch/rdcatch.cpp b/rdcatch/rdcatch.cpp index d11a14b6..3c36810c 100644 --- a/rdcatch/rdcatch.cpp +++ b/rdcatch/rdcatch.cpp @@ -205,9 +205,11 @@ MainWidget::MainWidget(RDConfig *c,QWidget *parent) connect(catch_connect.back()->connector(), SIGNAL(meterLevel(int,int,int,int)), this,SLOT(meterLevelData(int,int,int,int))); + /* connect(catch_connect.back()->connector(), SIGNAL(eventUpdated(int)), this,SLOT(eventUpdatedData(int))); + */ /* connect(catch_connect.back()->connector(), SIGNAL(eventPurged(int)), @@ -799,18 +801,25 @@ void MainWidget::deckEventSentData(int serial,int chan,int number) void MainWidget::catchEventReceivedData(RDCatchEvent *evt) { - printf("catchEventReceivedData()\n"); - printf("%s\n",evt->dump().toUtf8().constData()); + // printf("catchEventReceivedData()\n"); + // printf("%s\n",evt->dump().toUtf8().constData()); switch(evt->operation()) { case RDCatchEvent::PurgeEventOp: catch_recordings_model->removeRecord(evt->eventId()); - printf("removed event %u\n",evt->eventId()); + break; + + case RDCatchEvent::DeckStatusResponseOp: + if(evt->eventId()>0) { + if(!catch_recordings_model->refresh(evt->eventId())) { + catch_recordings_model->addRecord(evt->eventId()); + } + catch_recordings_model->setRecordStatus(evt->eventId(),evt->deckStatus()); + } break; case RDCatchEvent::DeckEventProcessedOp: case RDCatchEvent::DeckStatusQueryOp: - case RDCatchEvent::DeckStatusResponseOp: case RDCatchEvent::NullOp: case RDCatchEvent::LastOp: break; diff --git a/rdcatchd/rdcatchd.cpp b/rdcatchd/rdcatchd.cpp index 652e22f0..939c8d1b 100644 --- a/rdcatchd/rdcatchd.cpp +++ b/rdcatchd/rdcatchd.cpp @@ -470,8 +470,17 @@ void MainObject::catchEventReceivedData(RDCatchEvent *evt) rda->syslog(LOG_NOTICE,"catchEventReceivedData(): %s", evt->dump().toUtf8().constData()); - if(evt->operation()==RDCatchEvent::DeckStatusQueryOp) { + switch(evt->operation()) { + case RDCatchEvent::DeckStatusQueryOp: SendFullEventResponse(rda->station()->address()); + break; + + case RDCatchEvent::DeckEventProcessedOp: + case RDCatchEvent::DeckStatusResponseOp: + case RDCatchEvent::PurgeEventOp: + case RDCatchEvent::NullOp: + case RDCatchEvent::LastOp: + break; } /* chan=cmds.at(1).toInt(&ok);