|
|
|
@ -257,7 +257,14 @@ bool CQnetRelay::ProcessGateway(const int len, const unsigned char *raw)
|
|
|
|
// printf("DEBUG: ProcessGateway: unexpected pkt.header.seq %d, resetting to 0\n", pkt.header.seq);
|
|
|
|
// printf("DEBUG: ProcessGateway: unexpected pkt.header.seq %d, resetting to 0\n", pkt.header.seq);
|
|
|
|
dsrp.header.seq = 0;
|
|
|
|
dsrp.header.seq = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
memcpy(dsrp.header.flag, dstr.vpkt.hdr.flag, 41);
|
|
|
|
//memcpy(dsrp.header.flag, dstr.vpkt.hdr.flag, 41);
|
|
|
|
|
|
|
|
memcpy(dsrp.header.flag, dstr.vptk.hdr.flags, 3);
|
|
|
|
|
|
|
|
memcpy(dsrp.header.r1, dstr.vpkt.hdr.r1, 8);
|
|
|
|
|
|
|
|
memcpy(dsrp.header.r2, dstr.vpkt.hdr.r2, 8);
|
|
|
|
|
|
|
|
memcpy(dsrp.header.ur, dstr.vpkt.hdr.ur, 8);
|
|
|
|
|
|
|
|
memcpy(dstr.header.my, dstr.vpkt.hdr.my, 8);
|
|
|
|
|
|
|
|
memcpy(dstr.header.nm, dstr.vpkt.hdr.nm, 4);
|
|
|
|
|
|
|
|
dsrp.header.pfcs = dstr.vpkt.hdr.pfcs;
|
|
|
|
int ret = SendTo(msock, dsrp.title, 49, MMDVM_IP, MMDVM_IN_PORT);
|
|
|
|
int ret = SendTo(msock, dsrp.title, 49, MMDVM_IP, MMDVM_IN_PORT);
|
|
|
|
if (ret != 49) {
|
|
|
|
if (ret != 49) {
|
|
|
|
printf("ERROR: ProcessGateway: Could not write Header mmdvm packet\n");
|
|
|
|
printf("ERROR: ProcessGateway: Could not write Header mmdvm packet\n");
|
|
|
|
@ -306,7 +313,14 @@ bool CQnetRelay::ProcessMMDVM(const int len, const unsigned char *raw)
|
|
|
|
if (49 == len) { // header
|
|
|
|
if (49 == len) { // header
|
|
|
|
dstr.remaining = 0x30;
|
|
|
|
dstr.remaining = 0x30;
|
|
|
|
dstr.vpkt.ctrl = 0x80;
|
|
|
|
dstr.vpkt.ctrl = 0x80;
|
|
|
|
memcpy(dstr.vpkt.hdr.flag, dsrp.header.flag, 41);
|
|
|
|
//memcpy(dstr.vpkt.hdr.flag, dsrp.header.flag, 41);
|
|
|
|
|
|
|
|
memcpy(dstr.vpkt.hdr.flags, dsrp.header.flag, 3);
|
|
|
|
|
|
|
|
memcpy(dstr.vpkt.hdr.r1, dsrp.header.r1, 8);
|
|
|
|
|
|
|
|
memcpy(dstr.vpkt.hdr.r2, dsrp.header.r2, 8);
|
|
|
|
|
|
|
|
memcpy(dstr.vpkt.hdr.ur, dsrp.header.ur, 8);
|
|
|
|
|
|
|
|
memcpy(dstr.vpkt.hdr.my, dsrp.header.my, 8);
|
|
|
|
|
|
|
|
memcpy(dstr.vpkt.hdr.nm, dsrp.header.nm, 4);
|
|
|
|
|
|
|
|
dstr.vpkt.hdr.pfcs = dsrp.header.pfcs;
|
|
|
|
int ret = SendTo(msock, dstr.pkt_id, 58, G2_INTERNAL_IP, G2_IN_PORT);
|
|
|
|
int ret = SendTo(msock, dstr.pkt_id, 58, G2_INTERNAL_IP, G2_IN_PORT);
|
|
|
|
if (ret != 58) {
|
|
|
|
if (ret != 58) {
|
|
|
|
printf("ERROR: ProcessMMDVM: Could not write gateway header packet\n");
|
|
|
|
printf("ERROR: ProcessMMDVM: Could not write gateway header packet\n");
|
|
|
|
|