fixed broken logic with not in cache message play

pull/14/head
Tom Early 7 years ago
parent 0237326725
commit cdc8e68cd3

@ -1479,59 +1479,61 @@ void CQnetGateway::ProcessModem()
time(&(to_remote_g2[i].last_time)); time(&(to_remote_g2[i].last_time));
} }
} }
} else
else {
{ int i = dsvt.hdr.rpt1[7] - 'A';
int i = dsvt.hdr.rpt1[7] - 'A';
if (i>=0 && i<3) {
if (i>=0 && i<3) { /* the user we are trying to contact is on our gateway */
/* the user we are trying to contact is on our gateway */ /* make sure they are on a different module */
/* make sure they are on a different module */ if (temp_mod != dsvt.hdr.rpt1[7]) {
if (temp_mod != dsvt.hdr.rpt1[7]) { /*
/* The remote repeater has been set, lets fill in the dest_rptr
The remote repeater has been set, lets fill in the dest_rptr so that later we can send that to the LIVE web site
so that later we can send that to the LIVE web site */
*/ memcpy(band_txt[i].dest_rptr, dsvt.hdr.rpt2, 8);
memcpy(band_txt[i].dest_rptr, dsvt.hdr.rpt2, 8); band_txt[i].dest_rptr[7] = temp_mod;
band_txt[i].dest_rptr[7] = temp_mod; band_txt[i].dest_rptr[8] = '\0';
band_txt[i].dest_rptr[8] = '\0';
i = temp_mod - 'A';
i = temp_mod - 'A';
/* valid destination repeater module? */
/* valid destination repeater module? */ if (i>=0 && i<3) {
if (i>=0 && i<3) { /*
/* toRptr[i] : receiving from a remote system or cross-band
toRptr[i] : receiving from a remote system or cross-band band_txt[i] : local RF is talking.
band_txt[i] : local RF is talking. */
*/ if ((toRptr[i].last_time == 0) && (band_txt[i].last_time == 0)) {
if ((toRptr[i].last_time == 0) && (band_txt[i].last_time == 0)) { printf("CALLmode cross-banding from mod %c to %c\n", dsvt.hdr.rpt1[7], temp_mod);
printf("CALLmode cross-banding from mod %c to %c\n", dsvt.hdr.rpt1[7], temp_mod);
dsvt.hdr.rpt2[7] = temp_mod;
dsvt.hdr.rpt2[7] = temp_mod; dsvt.hdr.rpt1[7] = 'G';
dsvt.hdr.rpt1[7] = 'G'; calcPFCS(dsvt.title, 56);
calcPFCS(dsvt.title, 56);
Gate2Modem[i].Write(dsvt.title, 56);
Gate2Modem[i].Write(dsvt.title, 56);
/* This is the active streamid */
/* This is the active streamid */ toRptr[i].streamid = dsvt.streamid;
toRptr[i].streamid = dsvt.streamid;
/* time it, in case stream times out */
/* time it, in case stream times out */ time(&toRptr[i].last_time);
time(&toRptr[i].last_time);
toRptr[i].sequence = dsvt.ctrl;
toRptr[i].sequence = dsvt.ctrl; }
} }
} }
} }
else else
{
printf("icom rule: no routing from %.8s to %s%c\n", dsvt.hdr.rpt1, arearp_cs.c_str(), temp_mod); printf("icom rule: no routing from %.8s to %s%c\n", dsvt.hdr.rpt1, arearp_cs.c_str(), temp_mod);
}
} }
} }
} else
else {
{ if ('L' != dsvt.hdr.urcall[7]) // as long as this doesn't look like a linking command
if ('L' != dsvt.hdr.urcall[7]) // as long as this doesn't look like a linking command playNotInCache = true; // we need to wait until user's transmission is over
playNotInCache = true; // we need to wait until user's transmission is over }
} }
} }
} }

Loading…
Cancel
Save

Powered by TurnKey Linux.