don't block headerless streams in qnmodem && allow no irchost

pull/14/head
Tom Early 6 years ago
parent 9205868c5a
commit 4b9f775f89

@ -54,7 +54,7 @@
#define CFG_DIR "/usr/local/etc"
#endif
const std::string GW_VERSION("QnetGateway-603");
const std::string GW_VERSION("QnetGateway-608");
int CQnetGateway::FindIndex(const int i) const
{
@ -203,7 +203,7 @@ bool CQnetGateway::ReadConfig(char *cfgFile)
cfg.GetValue(p+"port", estr, ircddb[i].port, 1000, 65535);
cfg.GetValue(p+"password", estr, IRCDDB_PASSWORD[i], 0, 512);
}
if (0 == ircddb[0].ip.compare(ircddb[1].ip)) {
if ((ircddb[0].ip.size()+ircddb[1].ip.size() > 0) && (0 == ircddb[0].ip.compare(ircddb[1].ip))) {
fprintf(stderr, "IRC networks must be different\n");
return true;
}
@ -1920,7 +1920,7 @@ void CQnetGateway::Process()
aprs_future.get();
}
for (int i=0; i<2; i++) {
if (ii[i])
if (ii[i] && irc_data_future[i].valid())
irc_data_future[i].get();
}
}

@ -44,7 +44,7 @@
#include "QnetModem.h"
#include "QnetConfigure.h"
#define MODEM_VERSION "QnetModem-526"
#define MODEM_VERSION "QnetModem-608"
#define MAX_RESPONSES 30
const unsigned char FRAME_START = 0xE0U;
@ -68,7 +68,6 @@ const unsigned char TYPE_NACK = 0x7FU;
CQnetModem::CQnetModem(int mod)
: assigned_module(mod)
, dstarSpace(0U)
, g2_is_active(false)
{
}
@ -583,18 +582,15 @@ void CQnetModem::ProcessGateway(const SDSVT &dsvt)
memcpy(frame.header.pfcs, dsvt.hdr.pfcs, 2);
queue.push(CFrame(&frame.start));
PacketWait.start();
g2_is_active = true;
if (LOG_QSO)
printf("Queued to %s flags=%02x:%02x:%02x ur=%.8s r1=%.8s r2=%.8s my=%.8s/%.4s\n", MODEM_DEVICE.c_str(), frame.header.flag[0], frame.header.flag[1], frame.header.flag[2], frame.header.ur, frame.header.r2, frame.header.r1, frame.header.my, frame.header.nm);
} else { // write a voice data packet
if (g2_is_active) {
//const unsigned char sdsync[3] = { 0x55U, 0x2DU, 0x16U };
if (dsvt.ctrl & 0x40U) {
if (LOG_DEBUG && superframe.size())
printf("Final order: %s\n", superframe.c_str());
frame.length = 3U;
frame.type = TYPE_EOT;
g2_is_active = false;
if (LOG_QSO)
printf("Queued modem end of transmission\n");
} else {
@ -620,7 +616,6 @@ void CQnetModem::ProcessGateway(const SDSVT &dsvt)
PacketWait.start();
}
}
}
bool CQnetModem::ProcessModem(const SMODEM &frame)
{

@ -190,7 +190,6 @@ public:
private:
int assigned_module;
unsigned int dstarSpace;
bool g2_is_active;
// functions
bool VoicePacketIsSync(const unsigned char *);

Loading…
Cancel
Save

Powered by TurnKey Linux.