From bd0caa84a06243c16adc3559d6937860cc85c7b4 Mon Sep 17 00:00:00 2001 From: Tom Early Date: Sun, 21 Apr 2019 12:05:47 -0700 Subject: [PATCH] send the ping --- QnetGateway.cpp | 6 ++++++ ircddb/IRCDDBApp.cpp | 1 + 2 files changed, 7 insertions(+) diff --git a/QnetGateway.cpp b/QnetGateway.cpp index ae25e2e..effd65e 100644 --- a/QnetGateway.cpp +++ b/QnetGateway.cpp @@ -1359,6 +1359,9 @@ void CQnetGateway::ProcessModem() bool result = get_yrcall_rptr(temp_radio_user, arearp_cs, zonerp_cs, &temp_mod, ip, 'R'); if (result) { /* it is a repeater */ + std::string from = OWNER.substr(0, 7); + from.append(1, i+'A'); + ii->sendPing(temp_radio_user, from); to_remote_g2[i].streamid = dsvt.streamid; to_remote_g2[i].toDstar.Initialize(af_family, (uint16_t)g2_external.port, ip.c_str()); @@ -1416,6 +1419,9 @@ void CQnetGateway::ProcessModem() /* one radio user on a repeater module at a time */ if (to_remote_g2[i].toDstar.AddressIsZero()) { /* set the destination */ + std::string from = OWNER.substr(0, 7); + from.append(1, i+'A'); + ii->sendPing(temp_radio_user, from); to_remote_g2[i].streamid = dsvt.streamid; to_remote_g2[i].toDstar.Initialize(af_family, (uint16_t)g2_external.port, ip.c_str()); diff --git a/ircddb/IRCDDBApp.cpp b/ircddb/IRCDDBApp.cpp index aaee3e5..42c872e 100644 --- a/ircddb/IRCDDBApp.cpp +++ b/ircddb/IRCDDBApp.cpp @@ -447,6 +447,7 @@ void IRCDDBApp::sendPing(const std::string &to, const std::string &from) std::string ircUser = t + std::string("-") + std::to_string(j); if (1 == d->user.count(ircUser)) { + printf("IRCDDBApp::sendPing: sending ping to %s\n", ircUser.c_str()); IRCMessage *rm = new IRCMessage(t, "IDRT_PING"); rm->addParam(from); d->sendQ->putMessage(rm);