diff --git a/QnetGateway.cpp b/QnetGateway.cpp index d5e91ff..7ad82cb 100644 --- a/QnetGateway.cpp +++ b/QnetGateway.cpp @@ -1050,7 +1050,7 @@ void CQnetGateway::ProcessG2(const ssize_t g2buflen, const SDSVT &g2buf, const b if (LOG_QSO) { printf("id=%04x flags=%02x:%02x:%02x ur=%.8s r1=%.8s r2=%.8s my=%.8s/%.4s ", ntohs(g2buf.streamid), g2buf.hdr.flag[0], g2buf.hdr.flag[1], g2buf.hdr.flag[2], g2buf.hdr.urcall, g2buf.hdr.rpt1, g2buf.hdr.rpt2, g2buf.hdr.mycall, g2buf.hdr.sfx); if (is_from_g2) - printf("IP=%s-%u\n", fromDstar.GetAddress(), fromDstar.GetPort()); + printf("IP=[%s]:%u\n", fromDstar.GetAddress(), fromDstar.GetPort()); else printf("UnixSock=%s\n", link2gate.c_str()); } @@ -1370,7 +1370,7 @@ void CQnetGateway::ProcessModem() for (int j=0; j<5; j++) sendto(g2_sock, dsvt.title, 56, 0, to_remote_g2[i].toDstar.GetPointer(), to_remote_g2[i].toDstar.GetSize()); - printf("id=%04x zone route to IP=%s on port %u ur=%.8s r1=%.8s r2=%.8s my=%.8s/%.4s\n", + printf("id=%04x zone route to [%s]:%u ur=%.8s r1=%.8s r2=%.8s my=%.8s/%.4s\n", ntohs(dsvt.streamid), to_remote_g2[i].toDstar.GetAddress(), to_remote_g2[i].toDstar.GetPort(), dsvt.hdr.urcall, dsvt.hdr.rpt1, dsvt.hdr.rpt2, dsvt.hdr.mycall, dsvt.hdr.sfx); @@ -1424,7 +1424,7 @@ void CQnetGateway::ProcessModem() for (int j=0; j<5; j++) sendto(g2_sock, dsvt.title, 56, 0, to_remote_g2[i].toDstar.GetPointer(), to_remote_g2[i].toDstar.GetSize()); - printf("CS route to IP=%s on port %u id=%04x my=%.8s/%.4s ur=%.8s rpt1=%.8s rpt2=%.8s\n", to_remote_g2[i].toDstar.GetAddress(), to_remote_g2[i].toDstar.GetPort(), ntohs(dsvt.streamid), dsvt.hdr.mycall, dsvt.hdr.sfx, dsvt.hdr.urcall, dsvt.hdr.rpt1, dsvt.hdr.rpt2); + printf("Callsign route to [%s]:%u id=%04x my=%.8s/%.4s ur=%.8s rpt1=%.8s rpt2=%.8s\n", to_remote_g2[i].toDstar.GetAddress(), to_remote_g2[i].toDstar.GetPort(), ntohs(dsvt.streamid), dsvt.hdr.mycall, dsvt.hdr.sfx, dsvt.hdr.urcall, dsvt.hdr.rpt1, dsvt.hdr.rpt2); time(&(to_remote_g2[i].last_time)); } diff --git a/TCPReaderWriterClient.cpp b/TCPReaderWriterClient.cpp index 2ad7514..8f474ef 100644 --- a/TCPReaderWriterClient.cpp +++ b/TCPReaderWriterClient.cpp @@ -57,7 +57,7 @@ bool CTCPReaderWriterClient::Open() } if (0 == m_address.size() || 0 == m_port.size() || 0 == std::stoul(m_port)) { - fprintf(stderr, "ERROR: '%s:%s' is malformed!\n", m_address.c_str(), m_port.c_str()); + fprintf(stderr, "ERROR: '[%s]:%s' is malformed!\n", m_address.c_str(), m_port.c_str()); return true; } @@ -106,7 +106,7 @@ bool CTCPReaderWriterClient::Open() addr = &(addr6->sin6_addr); } if (inet_ntop(rp->ai_family, addr, buf, INET6_ADDRSTRLEN)) - fprintf(stderr, "Successfully connected to %s at %s on port %s\n", m_address.c_str(), buf, m_port.c_str()); + fprintf(stderr, "Successfully connected to %s at [%s]:%s\n", m_address.c_str(), buf, m_port.c_str()); break; } }