Skip to content

Commit

Permalink
fix tracing of port notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
willamowius committed Sep 8, 2022
1 parent 1ff119e commit db83d73
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Neighbor.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Neighboring System for GNU Gatekeeper
//
// Copyright (c) Citron Network Inc. 2002-2003
// Copyright (c) 2004-2020, Jan Willamowius
// Copyright (c) 2004-2022, Jan Willamowius
//
// This work is published under the GNU Public License version 2 (GPLv2)
// see file COPYING for details.
Expand Down
4 changes: 2 additions & 2 deletions RasTbl.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// bookkeeping for RAS-Server in H.323 gatekeeper
//
// Copyright (c) 2000-2021, Jan Willamowius
// Copyright (c) 2000-2022, Jan Willamowius
//
// This work is published under the GNU Public License version 2 (GPLv2)
// see file COPYING for details.
Expand Down Expand Up @@ -70,7 +70,7 @@ const long DEFAULT_ALERTING_TIMEOUT = 180000;
const int DEFAULT_IRQ_POLL_COUNT = 1;
}

PString AsString(PortType t)
PString PortTypeAsString(PortType t)
{
switch (t) {
case 1: return "RAS";
Expand Down
4 changes: 2 additions & 2 deletions RasTbl.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// bookkeeping for RAS-Server in H.323 gatekeeper
//
// Copyright (c) 2000-2021, Jan Willamowius
// Copyright (c) 2000-2022, Jan Willamowius
//
// This work is published under the GNU Public License version 2 (GPLv2)
// see file COPYING for details.
Expand Down Expand Up @@ -56,7 +56,7 @@ const unsigned WAIT_DELETE_AFTER_DISCONNECT = 30; // time to wait after discon
enum PortType { RASPort=1, Q931Port=2, H245Port=3, RTPPort=4, T120Port=5, RadiusPort=6, StatusPort=7 };
enum PortAction { PortOpen=1, PortClose=2 };

PString AsString(PortType t);
PString PortTypeAsString(PortType t);

class DynamicPort
{
Expand Down
6 changes: 3 additions & 3 deletions Toolkit.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// Toolkit base class for the GnuGk
//
// Copyright (c) 2000-2021, Jan Willamowius
// Copyright (c) 2000-2022, Jan Willamowius
//
// This work is published under the GNU Public License version 2 (GPLv2)
// see file COPYING for details.
Expand Down Expand Up @@ -3713,7 +3713,7 @@ bool Toolkit::IsPortNotificationActive() // not const to allow simple map access
void Toolkit::PortNotification(PortType type, PortAction action, const PString & protocol,
const PIPSocket::Address & addr, WORD port, PINDEX callNo)
{
PTRACE(5, "Port Notification " << ((action == PortOpen) ? "OPEN " : "CLOSE ") << AsString(type) << " " << protocol << " " << ::AsString(addr, port));
PTRACE(5, "Port Notification " << ((action == PortOpen) ? "OPEN " : "CLOSE ") << PortTypeAsString(type) << " " << protocol << " " << ::AsString(addr, port));

// book keeping for status port command
if (callNo != 0) {
Expand Down Expand Up @@ -3741,7 +3741,7 @@ void Toolkit::PortNotification(PortType type, PortAction action, const PString &
cmd.Replace("%p", protocol);
cmd.Replace("%n", PString(port));
cmd.Replace("%i", ::AsString(addr));
cmd.Replace("%t", ::AsString(type));
cmd.Replace("%t", PortTypeAsString(type));

if(system(cmd) == -1) {
PTRACE(1, "Error executing port notification: " << cmd);
Expand Down
1 change: 1 addition & 0 deletions changes.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Changes from 5.10 to 5.11
=========================
- BUGFIX(Toolkit.cxx) fix tracing of port notifications
- new switch: [RasSrv::LRQFeatures] PreserveDestination=1

Changes from 5.9 to 5.10
Expand Down

0 comments on commit db83d73

Please sign in to comment.