コミットメタ情報

リビジョン38c9547f44f62d67d5f1e67645b2e8ca10ce6d1a (tree)
日時2019-08-07 16:19:13
作者Satoshi Yasuda <7m3tjz@jarl...>
コミッターSatoshi Yasuda

ログメッセージ

modified: xchange.c
modified: xchange.h
modified: xchange_util.c

変更サマリ

差分

--- a/xchange.c
+++ b/xchange.c
@@ -64,7 +64,6 @@ void xchange_zr(void)
6464
6565 if (zr_length < 10) return;
6666 if (memcmp (zr_buff.zr_buffer, "DSTR", 4)) return;
67-
6867 zr_length = (zr_buff.d_packet.l[0] << 8) | zr_buff.d_packet.l[1];
6968 zr_length += 10;
7069 if (zr_buff.zr_buffer[6] == 's')
@@ -193,6 +192,7 @@ void xchange_gw(void)
193192 (struct sockaddr *)&gw_in_addr, &gw_in_addr_len);
194193 if (gw_length < 10) return;
195194 if (memcmp (gw_buff.gw_buffer, "DSTR", 4)) return;
195+ if (module_recv_frame_check (&gw_buff.gw_buffer[14])) return;
196196 if (gw_buff.gw_buffer[6] == 's')
197197 {
198198 send_gw_reply (gw_buff.gw_buffer);
@@ -313,7 +313,7 @@ void send_gw (unsigned char pkt[])
313313 {
314314 if (pkt[7] == 0x12) m_pnt->gw_dv_out_cnt++;
315315 else if (pkt[7] == 0x11) m_pnt->gw_dd_out_cnt++;
316- //memcpy (m_pnt->GWFrameID, &pkt[14], 2);
316+ memcpy (m_pnt->GWFrameID, &pkt[14], 2);
317317 }
318318 }
319319 else if ((length == 29) || (length == 32))
@@ -323,7 +323,7 @@ void send_gw (unsigned char pkt[])
323323 {
324324 if (pkt[7] == 0x12) m_pnt->gw_dv_out_cnt++;
325325 else if (pkt[7] == 0x11) m_pnt->gw_dd_out_cnt++;
326- //memcpy (m_pnt->GWFrameID, &pkt[14], 2);
326+ memcpy (m_pnt->GWFrameID, &pkt[14], 2);
327327 }
328328 }
329329 }
--- a/xchange.h
+++ b/xchange.h
@@ -65,7 +65,7 @@ struct ModuleTable
6565 unsigned char DVRecvFrameID[2];
6666 unsigned char DDRecvFrameID[2];
6767 unsigned char ZrFrameID[2];
68- //unsigned char GWFrameID[2];
68+ unsigned char GWFrameID[2];
6969 unsigned char mini_header;
7070 unsigned char data_temp[5];
7171 unsigned char mycall[8];
--- a/xchange_util.c
+++ b/xchange_util.c
@@ -103,7 +103,7 @@ struct ModuleTable *module_recv_frame_check (unsigned char FrameID[])
103103 }
104104 return NULL;
105105 }
106-#if 0
106+
107107 struct ModuleTable *module_skip_frame_check (unsigned char FrameID[])
108108 {
109109 struct ModuleTable *pnt;
@@ -116,7 +116,7 @@ struct ModuleTable *module_skip_frame_check (unsigned char FrameID[])
116116 }
117117 return NULL;
118118 }
119-#endif
119+
120120
121121 struct ModuleTable *module_zr_frame_check (unsigned char FrameID[])
122122 {
@@ -143,7 +143,7 @@ void module_init(struct ModuleTable *module, char Module[])
143143 memset (module->SendFrameID, 0x00, 2);
144144 memset (module->ZrFrameID, 0x00, 2);
145145 memset (module->FrameID, 0x00, 2);
146- //memset (module->GWFrameID, 0x00, 2);
146+ memset (module->GWFrameID, 0x00, 2);
147147 module->ZR_on = FALSE;
148148 module->packet_cnt = 0;
149149 module->f_chain = NULL;
旧リポジトリブラウザで表示