mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-12-01 14:20:11 +01:00
2022-11-29 Fred Gleason <fredg@paravelsystems.com>
* Added a 'SuppressRdcatchMeterUpdates=' directive to '[Hacks]' section of rd.conf(5). * Fixed a regression in the RDCatch subsystem that caused remote deck indication to break. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
@@ -393,6 +393,12 @@ QString RDConfig::saveWebgetFilesDirectory() const
|
||||
}
|
||||
|
||||
|
||||
bool RDConfig::suppressRdcatchMeterUpdates() const
|
||||
{
|
||||
return conf_suppress_rdcatch_meter_updates;
|
||||
}
|
||||
|
||||
|
||||
int RDConfig::meterBasePort() const
|
||||
{
|
||||
return conf_meter_base_port;
|
||||
@@ -615,8 +621,10 @@ bool RDConfig::load()
|
||||
profile->boolValue("Hacks","DisableMaintChecks",false);
|
||||
conf_save_webget_files_directory=
|
||||
profile->stringValue("Hacks","SaveWebgetFilesDirectory");
|
||||
conf_lock_rdairplay_memory=
|
||||
profile->boolValue("Hacks","LockRdairplayMemory",false);
|
||||
conf_disable_maint_checks=
|
||||
profile->boolValue("Hacks","DisableMaintChecks",false);
|
||||
conf_suppress_rdcatch_meter_updates=
|
||||
profile->boolValue("Hacks","SuppressRdcatchMeterUpdates",false);
|
||||
conf_meter_base_port=
|
||||
profile->intValue("Hacks","MeterPortBaseNumber",RD_DEFAULT_METER_SOCKET_BASE_UDP_PORT);
|
||||
conf_meter_port_range=
|
||||
@@ -745,6 +753,7 @@ void RDConfig::clear()
|
||||
conf_jack_ports[1].clear();
|
||||
conf_disable_maint_checks=false;
|
||||
conf_save_webget_files_directory="";
|
||||
conf_suppress_rdcatch_meter_updates=false;
|
||||
conf_lock_rdairplay_memory=false;
|
||||
conf_meter_base_port=RD_DEFAULT_METER_SOCKET_BASE_UDP_PORT;
|
||||
conf_meter_port_range=RD_METER_SOCKET_PORT_RANGE;
|
||||
|
||||
@@ -104,6 +104,7 @@ class RDConfig
|
||||
int meterBasePort() const;
|
||||
int meterPortRange() const;
|
||||
QString saveWebgetFilesDirectory() const;
|
||||
bool suppressRdcatchMeterUpdates() const;
|
||||
bool enableMixerLogging() const;
|
||||
uid_t uid() const;
|
||||
gid_t gid() const;
|
||||
@@ -176,6 +177,7 @@ class RDConfig
|
||||
bool conf_disable_maint_checks;
|
||||
bool conf_lock_rdairplay_memory;
|
||||
QString conf_save_webget_files_directory;
|
||||
bool conf_suppress_rdcatch_meter_updates;
|
||||
int conf_meter_base_port;
|
||||
int conf_meter_port_range;
|
||||
std::vector<QString> conf_jack_ports[2];
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// Multi-interface multicast transciever
|
||||
//
|
||||
// (C) Copyright 2018-2021 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2018-2022 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Library General Public License
|
||||
@@ -25,6 +25,8 @@
|
||||
#include <net/if.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <QNetworkDatagram>
|
||||
|
||||
#include "rdmulticaster.h"
|
||||
|
||||
RDMulticaster::RDMulticaster(QObject *parent)
|
||||
@@ -101,18 +103,10 @@ void RDMulticaster::send(const QString &msg,const QHostAddress &m_addr,
|
||||
|
||||
void RDMulticaster::readyReadData()
|
||||
{
|
||||
struct sockaddr_in sa;
|
||||
socklen_t sa_len=sizeof(struct sockaddr_in);
|
||||
char data[1501];
|
||||
int n;
|
||||
|
||||
memset(&sa,0,sizeof(sa));
|
||||
while((n=recvfrom(multi_socket->socketDescriptor(),data,1500,MSG_DONTWAIT,
|
||||
(sockaddr *)&sa,&sa_len))>0) {
|
||||
data[n]=0;
|
||||
QString msg(data);
|
||||
emit received(msg,QHostAddress(ntohl(sa.sin_addr.s_addr)));
|
||||
sa_len=sizeof(struct sockaddr_in);
|
||||
while(multi_socket->hasPendingDatagrams()) {
|
||||
QNetworkDatagram dg=multi_socket->receiveDatagram();
|
||||
printf("emitting: %s",dg.data().constData());
|
||||
emit received(QString::fromUtf8(dg.data()),dg.senderAddress());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user