mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-10-16 23:51:20 +02:00
2023-09-20 Fred Gleason <fredg@paravelsystems.com>
* Removed definition of CAED_TCP_PORT from 'lib/rd.h'. * Added definition of RD_CAED_PORT to 'lib/rd.h'. * Added definition of RD_CAED_TIMEOUT_INTERVAL to 'lib/rd.h'. * Fixed a bug in caed(8) that broke metering CAE commands. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
@@ -18,6 +18,8 @@
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
|
||||
#include <rdapplication.h>
|
||||
|
||||
#include "connection.h"
|
||||
|
||||
Connection::Connection(const SessionId &sid,QObject *parent)
|
||||
@@ -25,6 +27,7 @@ Connection::Connection(const SessionId &sid,QObject *parent)
|
||||
{
|
||||
d_session_id=sid;
|
||||
d_interval=0;
|
||||
d_meter_port=0;
|
||||
|
||||
d_timer=new QTimer(this);
|
||||
d_timer->setSingleShot(true);
|
||||
@@ -44,6 +47,20 @@ SessionId Connection::sessionId() const
|
||||
}
|
||||
|
||||
|
||||
uint16_t Connection::meterPort() const
|
||||
{
|
||||
return d_meter_port;
|
||||
}
|
||||
|
||||
|
||||
void Connection::setMeterPort(uint16_t udp_port)
|
||||
{
|
||||
printf("setMeterPort(%s::setMeterPort(%u)\n",
|
||||
dump().toUtf8().constData(),0xffff&udp_port);
|
||||
d_meter_port=udp_port;
|
||||
}
|
||||
|
||||
|
||||
QString Connection::dump() const
|
||||
{
|
||||
return d_session_id.dump();
|
||||
@@ -79,5 +96,7 @@ void Connection::touch()
|
||||
|
||||
void Connection::timerData()
|
||||
{
|
||||
rda->syslog(LOG_WARNING,"connection %s timed out",
|
||||
d_session_id.dump().toUtf8().constData());
|
||||
emit connectionExpired(d_session_id);
|
||||
}
|
||||
|
Reference in New Issue
Block a user