• R/O
  • HTTP
  • SSH
  • HTTPS

dxchange: Commit


Commit MetaInfo

Revisiondf540800fc322c5045663e1ee8187d354d814964 (tree)
Time2016-06-27 09:52:45
AuthorSatoshi Yasuda <7m3tjz@jk1z...>
CommiterSatoshi Yasuda

Log Message

modified: repeater.c

Change Summary

Incremental Difference

--- a/repeater.c
+++ b/repeater.c
@@ -30,6 +30,7 @@ struct sockaddr_in gw_in_addr;
3030 struct sockaddr_in gw_out_addr;
3131
3232 char zr_frame_id[2] = {0x00, 0x00};
33+char mon_frame_id[2] = {0x00, 0x00};
3334
3435 union
3536 {
@@ -255,6 +256,8 @@ int repeater_mon(void)
255256 timeradd (&cur_time, &time_21ms, &m_pnt->recv_time);
256257 m_pnt->lost_cnt = 0;
257258 }
259+ if ((zr_port == 0) || (mon_buff.d_packet.body.header.rpt2[7] != 'G'))
260+ memcpy (mon_frame_id, mon_buff.d_packet.trunk.FrameID, 2);
258261 }
259262 else if (length == 29) // voice packet ICOM
260263 {
@@ -291,7 +294,8 @@ int repeater_mon(void)
291294 }
292295 if (forward_pnt)
293296 {
294- forward (mon_buff.d_packet, length);
297+ if (!memcmp (mon_frame_id, mon_buff.d_packet.trunk.FrameID, 2))
298+ forward (mon_buff.d_packet, length);
295299 }
296300 }
297301 return TRUE;
@@ -344,7 +348,8 @@ int repeater_init(void)
344348 // Bind
345349 if(bind(rpt_mon_sd, (struct sockaddr *)&rpt_mon_addr, sizeof(rpt_mon_addr)) < 0) {
346350 time(&atime);
347- fprintf (log_file, "%24.24s Zone Repeater Monitor socket not bind %s\n", ctime(&atime), strerror(errno));
351+ fprintf (log_file, "%24.24s Zone Repeater Monitor socket not bind %s\n",
352+ ctime(&atime), strerror(errno));
348353 return FALSE;
349354 }
350355 }
Show on old repository browser