cleaned up log messages

pull/14/head
Tom Early 7 years ago
parent 6eab9e220c
commit 3933666aa0

@ -511,7 +511,6 @@ void CQnetGateway::GetIRCDataThread()
case IDRT_PING: case IDRT_PING:
ii->receivePing(rptr); ii->receivePing(rptr);
ReplaceChar(rptr, '_', ' '); ReplaceChar(rptr, '_', ' ');
printf("IDRT_PING rptr=%s\n", rptr.c_str());
if (! rptr.empty()) { if (! rptr.empty()) {
pthread_mutex_lock(&irc_data_mutex); pthread_mutex_lock(&irc_data_mutex);
auto git = rptr2gwy_map.find(rptr); auto git = rptr2gwy_map.find(rptr);
@ -522,12 +521,13 @@ void CQnetGateway::GetIRCDataThread()
ipaddr = ait->second; ipaddr = ait->second;
CSockAddress to(af_family, (unsigned short)g2_external.port, ipaddr.c_str()); CSockAddress to(af_family, (unsigned short)g2_external.port, ipaddr.c_str());
sendto(g2_sock, "PONG", 4, 0, to.GetPointer(), to.GetSize()); sendto(g2_sock, "PONG", 4, 0, to.GetPointer(), to.GetSize());
printf("Sent 'PONG' to %s\n", ipaddr.c_str()); if (LOG_QSO)
printf("Sent 'PONG' to %s\n", ipaddr.c_str());
} else { } else {
printf("Can't find gateway %s in gwy2ip_map\n", gateway.c_str()); printf("Can't respond to PING, gateway %s not in gwy2ip_map\n", gateway.c_str());
} }
} else { } else {
printf("Can't find repeater %s in rptr2gwy_map\n", rptr.c_str()); printf("Can't respond to PING, repeater %s not in rptr2gwy_map\n", rptr.c_str());
} }
pthread_mutex_unlock(&irc_data_mutex); pthread_mutex_unlock(&irc_data_mutex);
} }
@ -1908,7 +1908,7 @@ void CQnetGateway::Process()
SDSVT dsvt; SDSVT dsvt;
socklen_t fromlen = sizeof(struct sockaddr_storage); socklen_t fromlen = sizeof(struct sockaddr_storage);
ssize_t g2buflen = recvfrom(g2_sock, dsvt.title, 56, 0, fromDstar.GetPointer(), &fromlen); ssize_t g2buflen = recvfrom(g2_sock, dsvt.title, 56, 0, fromDstar.GetPointer(), &fromlen);
if (4==g2buflen && 0==memcmp(dsvt.title, "PONG", 4)) if (LOG_QSO && 4==g2buflen && 0==memcmp(dsvt.title, "PONG", 4))
printf("Got a pong from [%s]:%u\n", fromDstar.GetAddress(), fromDstar.GetPort()); printf("Got a pong from [%s]:%u\n", fromDstar.GetAddress(), fromDstar.GetPort());
else else
ProcessG2(g2buflen, dsvt, true); ProcessG2(g2buflen, dsvt, true);

@ -180,7 +180,6 @@ bool IRCProtocol::processQueues(IRCMessageQueue *recvQ, IRCMessageQueue *sendQ)
std::string out; std::string out;
m->composeMessage(out); m->composeMessage(out);
out.pop_back(); out.pop_back(); out.pop_back(); out.pop_back();
printf("# of params=%d: msg:%s\n", m->numParams, out.c_str());
if (2 == m->numParams) { if (2 == m->numParams) {
if (0 == m->params[0].compare(channel)) { if (0 == m->params[0].compare(channel)) {
app->msgChannel(m); app->msgChannel(m);
@ -188,7 +187,6 @@ bool IRCProtocol::processQueues(IRCMessageQueue *recvQ, IRCMessageQueue *sendQ)
printf("currentNick='%s' 1='%s'\n", currentNick.c_str(), m->params[1].c_str()); printf("currentNick='%s' 1='%s'\n", currentNick.c_str(), m->params[1].c_str());
if (0 == m->params[1].find("IDRT_PING")) { if (0 == m->params[1].find("IDRT_PING")) {
std::string from = m->params[1].substr(10); std::string from = m->params[1].substr(10);
printf("to replyQ: IDRT_PING %s\n", from.c_str());
IRCMessage *rm = new IRCMessage("IDRT_PING"); IRCMessage *rm = new IRCMessage("IDRT_PING");
rm->addParam(from); rm->addParam(from);
app->putReplyMessage(rm); app->putReplyMessage(rm);

Loading…
Cancel
Save

Powered by TurnKey Linux.