diff --git a/QnetGateway.cpp b/QnetGateway.cpp index cdb2da3..ceff056 100644 --- a/QnetGateway.cpp +++ b/QnetGateway.cpp @@ -2442,13 +2442,16 @@ bool CQnetGateway::Init(char *cfgfile) } // Open unix sockets between qngateway and qnremote + printf("Connecting to qnlink at %s\n", tolink.c_str()); if (ToLink.Open(tolink.c_str())) return true; + printf("Opening remote port at %s\n", fromremote.c_str()); if (FromRemote.Open(fromremote.c_str())) return true; for (i=0; i<3; i++) { if (Rptr.mod[i].defined) { // open unix sockets between qngateway and each defined modem + printf("Connecting to modem at %s\n", tomodem[i].c_str()); ToModem[i].Open(tomodem[i].c_str()); } // recording for echotest on local repeater modules diff --git a/QnetLink.cpp b/QnetLink.cpp index 5abde4b..6e546ce 100644 --- a/QnetLink.cpp +++ b/QnetLink.cpp @@ -604,6 +604,7 @@ bool CQnetLink::srv_open() } /* create our gateway unix sockets */ + printf("Connecting to qngateway at %s\n", togate.c_str()); if (ToGate.Open(togate.c_str())) { close(dcs_g2_sock); dcs_g2_sock = -1; diff --git a/QnetModem.cpp b/QnetModem.cpp index 419748a..0f664dd 100644 --- a/QnetModem.cpp +++ b/QnetModem.cpp @@ -222,6 +222,7 @@ bool CQnetModem::Initialize(const char *cfgfile) std::signal(SIGINT, SignalCatch); std::signal(SIGHUP, SignalCatch); + printf("Connecting to qngateway at %s\n", togate.c_str()); if (ToGate.Open(togate.c_str())) return true; @@ -788,7 +789,7 @@ bool CQnetModem::ReadConfig(const char *cfgFile) RPTR_MOD = 'A' + assigned_module; cfg.GetValue(modem_path+"_device", type, MODEM_DEVICE, 7, FILENAME_MAX); - cfg.GetValue("gateway_tomodem"+std::string(1, 'a'+assigned_module), estr, togate, 1, FILENAME_MAX); + cfg.GetValue(std::string("gateway_tomodem")+std::string(1, 'a'+assigned_module), estr, togate, 1, FILENAME_MAX); if (cfg.GetValue(modem_path+"_tx_frequency", type, TX_FREQUENCY, 1.0, 6000.0)) return true; // we have to have a valid frequency diff --git a/UnixPacketSock.cpp b/UnixPacketSock.cpp index dc3b8eb..c3f1e60 100644 --- a/UnixPacketSock.cpp +++ b/UnixPacketSock.cpp @@ -56,7 +56,7 @@ bool CUnixPacketServer::Open(const char *name) { m_server = socket(AF_UNIX, SOCK_SEQPACKET, 0); if (m_server < 0) { - std::cerr << "Cannot open " << name << " Unix server socket!" << std::endl; + std::cerr << "Cannot open " << name << " unix server socket!" << std::endl; return true; } @@ -65,20 +65,20 @@ bool CUnixPacketServer::Open(const char *name) addr.sun_family = AF_UNIX; memcpy(addr.sun_path+1, name, strlen(name)); if (-1 == bind(m_server, (struct sockaddr *)&addr, sizeof(addr))) { - std::cerr << "Cannot bind " << name << "Unix server socket!" << std::endl; + std::cerr << "Cannot bind unix server socket " << name << std::endl; Close(); return true; } if (-1 == listen(m_server, 1)) { - std::cerr << "Cannot listen on " << name << "Unix server socket!" << std::endl; + std::cerr << "Cannot listen on unix server socket " << name << std::endl; Close(); return true; } m_fd = accept(m_server, nullptr, 0); if (m_fd < 0) { - std::cerr << "Cannot accept on " << name << "Unix server socket!" << std::endl; + std::cerr << "Cannot accept on unix server socket " << name << std::endl; Close(); return true; } @@ -106,7 +106,7 @@ bool CUnixPacketClient::Open(const char *name) { m_fd = socket(AF_UNIX, SOCK_SEQPACKET, 0); if (m_fd < 0) { - std::cerr << "Cannot open " << name << " Unix client socket!" << std::endl; + std::cerr << "Cannot open unix client socket " << name << std::endl; return true; } @@ -115,7 +115,7 @@ bool CUnixPacketClient::Open(const char *name) addr.sun_family = AF_UNIX; memcpy(addr.sun_path+1, name, strlen(name)); if (-1 == connect(m_fd, (struct sockaddr *)&addr, sizeof(addr))) { - std::cerr << "Cannot connect " << name << "Unix client socket!" << std::endl; + std::cerr << "Cannot connect unix client socket " << name << std::endl; Close(); return true; }