send the ping

pull/14/head
Tom Early 7 years ago
parent 532e65f928
commit bd0caa84a0

@ -1359,6 +1359,9 @@ void CQnetGateway::ProcessModem()
bool result = get_yrcall_rptr(temp_radio_user, arearp_cs, zonerp_cs, &temp_mod, ip, 'R'); bool result = get_yrcall_rptr(temp_radio_user, arearp_cs, zonerp_cs, &temp_mod, ip, 'R');
if (result) { /* it is a repeater */ 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].streamid = dsvt.streamid;
to_remote_g2[i].toDstar.Initialize(af_family, (uint16_t)g2_external.port, ip.c_str()); 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 */ /* one radio user on a repeater module at a time */
if (to_remote_g2[i].toDstar.AddressIsZero()) { if (to_remote_g2[i].toDstar.AddressIsZero()) {
/* set the destination */ /* 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].streamid = dsvt.streamid;
to_remote_g2[i].toDstar.Initialize(af_family, (uint16_t)g2_external.port, ip.c_str()); to_remote_g2[i].toDstar.Initialize(af_family, (uint16_t)g2_external.port, ip.c_str());

@ -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); std::string ircUser = t + std::string("-") + std::to_string(j);
if (1 == d->user.count(ircUser)) { if (1 == d->user.count(ircUser)) {
printf("IRCDDBApp::sendPing: sending ping to %s\n", ircUser.c_str());
IRCMessage *rm = new IRCMessage(t, "IDRT_PING"); IRCMessage *rm = new IRCMessage(t, "IDRT_PING");
rm->addParam(from); rm->addParam(from);
d->sendQ->putMessage(rm); d->sendQ->putMessage(rm);

Loading…
Cancel
Save

Powered by TurnKey Linux.