mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-08-07 07:39:33 +02:00
2021-02-25 Fred Gleason <fredg@paravelsystems.com>
* Removed vestigal signals from 'RDSocket'. * Fixed a bug in 'RDApplication' that could cause 'openlog(3)' to receive a corrupt 'ident' value. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
parent
f755f59651
commit
5d948d0848
@ -21210,3 +21210,7 @@
|
||||
2021-02-25 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Fixed regressions in rdairplay(1) that caused incorrect color
|
||||
rendering.
|
||||
2021-02-25 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Removed vestigal signals from 'RDSocket'.
|
||||
* Fixed a bug in 'RDApplication' that could cause 'openlog(3)'
|
||||
to receive a corrupt 'ident' value.
|
||||
|
@ -51,6 +51,15 @@ RDCoreApplication::RDCoreApplication(const QString &module_name,
|
||||
app_command_name=cmdname;
|
||||
app_usage=usage;
|
||||
|
||||
//
|
||||
// Maintainer's Note
|
||||
//
|
||||
// This for the 'ident' value passed to openlog(1). It *must*
|
||||
// an actual (const char *) string stored on the heap. *Don't* pass
|
||||
// a QByteArray!
|
||||
//
|
||||
strncpy(app_syslog_name,cmdname.toUtf8(),PATH_MAX-1);
|
||||
|
||||
app_heartbeat=NULL;
|
||||
app_airplay_conf=NULL;
|
||||
app_cae=NULL;
|
||||
@ -155,10 +164,10 @@ bool RDCoreApplication::open(QString *err_msg,RDCoreApplication::ErrorType *err_
|
||||
// Initialize Logging
|
||||
//
|
||||
if(app_cmd_switch->debugActive()) {
|
||||
openlog(app_command_name.toUtf8(),LOG_PERROR,app_config->syslogFacility());
|
||||
openlog(app_syslog_name,LOG_PERROR,app_config->syslogFacility());
|
||||
}
|
||||
else {
|
||||
openlog(app_command_name.toUtf8(),0,app_config->syslogFacility());
|
||||
openlog(app_syslog_name,0,app_config->syslogFacility());
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -101,6 +101,7 @@ class RDCoreApplication : public QObject
|
||||
RDDbHeartbeat *app_heartbeat;
|
||||
QString app_ticket;
|
||||
QString app_module_name;
|
||||
char app_syslog_name[PATH_MAX];
|
||||
QString app_command_name;
|
||||
QString app_usage;
|
||||
};
|
||||
|
@ -119,7 +119,7 @@ RDLiveWire::RDLiveWire(unsigned id,QObject *parent)
|
||||
//
|
||||
live_socket=new QTcpSocket(this);
|
||||
connect(live_socket,SIGNAL(connected()),this,SLOT(connectedData()));
|
||||
connect(live_socket,SIGNAL(connectionClosed()),
|
||||
connect(live_socket,SIGNAL(disconnected()),
|
||||
this,SLOT(connectionClosedData()));
|
||||
connect(live_socket,SIGNAL(readyRead()),this,SLOT(readyReadData()));
|
||||
connect(live_socket,SIGNAL(error(QAbstractSocket::SocketError)),
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// A QTcpSocket object with connection-ID.
|
||||
//
|
||||
// (C) Copyright 2002-2020 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2021 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
|
||||
@ -31,10 +31,7 @@ RDSocket::RDSocket(int id,QObject *parent)
|
||||
connect(this,SIGNAL(hostFound()),this,SLOT(hostFoundData()));
|
||||
connect(this,SIGNAL(connected()),this,SLOT(connectedData()));
|
||||
connect(this,SIGNAL(disconnected()),this,SLOT(connectionClosedData()));
|
||||
connect(this,SIGNAL(delayedCloseFinished()),
|
||||
this,SLOT(delayedCloseFinishedData()));
|
||||
connect(this,SIGNAL(readyRead()),this,SLOT(readyReadData()));
|
||||
connect(this,SIGNAL(bytesWritten(int)),this,SLOT(bytesWrittenData(int)));
|
||||
connect(this,SIGNAL(error(QAbstractSocket::SocketError)),
|
||||
this,SLOT(errorData(QAbstractSocket::SocketError)));
|
||||
}
|
||||
@ -58,24 +55,12 @@ void RDSocket::connectionClosedData()
|
||||
}
|
||||
|
||||
|
||||
void RDSocket::delayedCloseFinishedData()
|
||||
{
|
||||
emit delayedCloseFinishedID(id_num);
|
||||
}
|
||||
|
||||
|
||||
void RDSocket::readyReadData()
|
||||
{
|
||||
emit readyReadID(id_num);
|
||||
}
|
||||
|
||||
|
||||
void RDSocket::bytesWrittenData(int nbytes)
|
||||
{
|
||||
emit bytesWrittenID(nbytes,id_num);
|
||||
}
|
||||
|
||||
|
||||
void RDSocket::errorData(QAbstractSocket::SocketError error)
|
||||
{
|
||||
emit errorID(error,id_num);
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// A QSocket object with connection-ID.
|
||||
//
|
||||
// (C) Copyright 2002-2020 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2021 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
|
||||
@ -21,8 +21,7 @@
|
||||
#ifndef RDSOCKET_H
|
||||
#define RDSOCKET_H
|
||||
|
||||
#include <qobject.h>
|
||||
#include <qtcpsocket.h>
|
||||
#include <QTcpSocket>
|
||||
|
||||
class RDSocket : public QTcpSocket
|
||||
{
|
||||
@ -34,18 +33,14 @@ class RDSocket : public QTcpSocket
|
||||
void hostFoundID(int id);
|
||||
void connectedID(int id);
|
||||
void connectionClosedID(int id);
|
||||
void delayedCloseFinishedID(int id);
|
||||
void readyReadID(int id);
|
||||
void bytesWrittenID(int nbytes,int id);
|
||||
void errorID(QAbstractSocket::SocketError error,int id);
|
||||
|
||||
private slots:
|
||||
void hostFoundData();
|
||||
void connectedData();
|
||||
void connectionClosedData();
|
||||
void delayedCloseFinishedData();
|
||||
void readyReadData();
|
||||
void bytesWrittenData(int nbytes);
|
||||
void errorData(QAbstractSocket::SocketError error);
|
||||
|
||||
private:
|
||||
|
@ -96,7 +96,7 @@ SasUsi::SasUsi(RDMatrix *matrix,QObject *parent)
|
||||
connect(sas_socket,SIGNAL(readyRead()),
|
||||
this,SLOT(readyReadData()));
|
||||
connect(sas_socket,SIGNAL(error(QAbstractSocket::SocketError)),
|
||||
this,SLOT(errorData(Q)));
|
||||
this,SLOT(errorData(QAbstractSocket::SocketError)));
|
||||
ipConnect();
|
||||
break;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user