• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Keine Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#objective-cqtwindows誰得cocoapythonphprubygameguibathyscaphec翻訳omegat計画中(planning stage)frameworktwittertestdomvb.netdirectxbtronarduinopreviewerゲームエンジン

Commit MetaInfo

Revisionc34cd27652b129734ff6b20ab74d8ae26778707d (tree)
Zeit2022-07-29 08:49:32
AutorSatoshi Yasuda <7m3tjz;jarl.com>
CommiterSatoshi Yasuda

Log Message

modified: dstatus_utils.c
modified: extern_dstatus.h
modified: repeater.c
modified: status_send.c

Ändern Zusammenfassung

Diff

--- a/dstatus.h
+++ b/dstatus.h
@@ -153,7 +153,7 @@ fd_set read_set;
153153 fd_set fd_save;
154154
155155
156-struct ModuleTable *module_pnt;
156+struct ModuleTable *module_pnt, *module_last;
157157
158158 unsigned char dtmf_c, dtmf_c_save;
159159 unsigned char dtmf_c_save1, dtmf_c_save2;
--- a/dstatus_utils.c
+++ b/dstatus_utils.c
@@ -63,7 +63,7 @@ void module_pass_check (void)
6363 }
6464 }
6565
66-struct ModuleTable *module_check (char call[])
66+struct ModuleTable *module_check (char call[], char flag)
6767 {
6868
6969 struct ModuleTable *pnt;
@@ -73,6 +73,7 @@ struct ModuleTable *module_check (char call[])
7373
7474 while (pnt)
7575 {
76+ if (!memcmp (call, pnt->ModuleName, 8) && (flag == pnt->rs_flag)) return pnt;
7677 if (!memcmp (call, pnt->ModuleName, 8)) return pnt;
7778 pnt = pnt->f_chain;
7879 }
@@ -80,13 +81,14 @@ struct ModuleTable *module_check (char call[])
8081 }
8182
8283
83-struct ModuleTable *module_check_ex (char FrameID[])
84+struct ModuleTable *module_check_ex (char FrameID[], char flag)
8485 {
8586 struct ModuleTable *pnt;
8687
8788 pnt = module_pnt;
8889 while (pnt)
8990 {
91+ if (!memcmp (FrameID, pnt->FrameID, 2) && (flag == pnt->rs_flag)) return pnt;
9092 if (!memcmp (FrameID, pnt->FrameID, 2)) return pnt;
9193 pnt = pnt->f_chain;
9294 }
--- a/extern_dstatus.h
+++ b/extern_dstatus.h
@@ -147,7 +147,7 @@ extern fd_set read_set;
147147 extern fd_set fd_save;
148148
149149
150-extern struct ModuleTable *module_pnt;
150+extern struct ModuleTable *module_pnt, *module_last;
151151
152152 extern unsigned char dtmf_c, dtmf_c_save;
153153 extern unsigned char dtmf_c_save1, dtmf_c_save2;
--- a/repeater.c
+++ b/repeater.c
@@ -78,8 +78,20 @@ int repeater_mon(void)
7878 else flag = 'S';
7979 if (length == 58)
8080 {
81- if (flag == 'S') m_pnt = module_check(mon_buff.d_packet.body.header.rpt1, flag);
82- else m_pnt = module_check(mon_buff.d_packet.body.header.rpt2, flag);
81+ if (flag == 'S')
82+ {
83+ m_pnt = module_check(mon_buff.d_packet.body.header.rpt1, flag);
84+ if (mon_buff.mon_buffer[7] & GW_ON) m_pnt->gw_dv_in_cnt++;
85+ else if (mon_buff.mon_buffer[7] & ZR_ON) m_pnt->zr_dv_in_cnt++;
86+ else if (mon_buff.mon_buffer[7] & FWD_ON) m_pnt->fwd_dv_in_cnt++;
87+ }
88+ else
89+ {
90+ m_pnt = module_check(mon_buff.d_packet.body.header.rpt2, flag);
91+ if (mon_buff.mon_buffer[7] & GW_ON) m_pnt->gw_dv_in_cnt++;
92+ else if (mon_buff.mon_buffer[7] & ZR_ON) m_pnt->zr_dv_in_cnt++;
93+ else if (mon_buff.mon_buffer[7] & ZR_ON) m_pnt->zr_dv_in_cnt++;
94+ }
8395 if (m_pnt)
8496 {
8597 memcpy (&m_pnt->rpt_save, &mon_buff, 58);
@@ -92,9 +104,6 @@ int repeater_mon(void)
92104 time_21ms.tv_usec = 21000;
93105 timeradd (&cur_time, &time_21ms, &m_pnt->recv_time);
94106 m_pnt->lost_cnt = 0;
95- if (mon_buff.mon_buffer[7] & GW_ON) m_pnt->gw_dv_in_cnt++;
96- else if (mon_buff.mon_buffer[7] & ZR_ON) m_pnt->zr_dv_in_cnt++;
97- else if (mon_buff.mon_buffer[7] & FWD_ON) m_pnt->fwd_dv_in_cnt++;
98107 }
99108 }
100109 else if (length == 29) // voice packet ICOM
@@ -124,6 +133,9 @@ int repeater_mon(void)
124133 m_pnt->rpt_save_length = 32;
125134 rep_send (m_pnt);
126135 //module_delete (m_pnt);
136+ if (mon_buff.mon_buffer[7] & GW_ON) m_pnt->gw_dv_in_cnt++;
137+ else if (mon_buff.mon_buffer[7] & ZR_ON) m_pnt->zr_dv_in_cnt++;
138+ else if (mon_buff.mon_buffer[7] & FWD_ON) m_pnt->fwd_dv_in_cnt++;
127139 }
128140 }
129141 }
--- a/status_send.c
+++ b/status_send.c
@@ -128,7 +128,7 @@ void status_send_ptton(struct ModuleTable *pnt)
128128
129129 memcpy (&pnt->STATUS_Frm.StatusID, "DSTRST", 6);
130130 memcpy (&pnt->STATUS_Frm.Type, "05", 2);
131- //if (pnt->rs_flag == 'R') memcpy (&pnt->STATUS_Frm.Type, "15", 2);
131+ if (pnt->rs_flag == 'R') memcpy (&pnt->STATUS_Frm.Type, "15", 2);
132132 memcpy (&pnt->STATUS_Frm.body.status.RPT2Call, &pnt->rpt_save.body.header.rpt2, 36);
133133 memset (&pnt->STATUS_Frm.ip_addr, 0x00, 16);
134134 #if __WORDSIZE == 64
@@ -176,7 +176,7 @@ void status_send_pttoff (struct ModuleTable *pnt)
176176
177177 memcpy (&pnt->STATUS_Frm.StatusID, "DSTRST", 6);
178178 memcpy (&pnt->STATUS_Frm.Type, "06", 2);
179- //if (pnt->rs_flag == 'R') memcpy (&pnt->STATUS_Frm.Type, "16", 2);
179+ if (pnt->rs_flag == 'R') memcpy (&pnt->STATUS_Frm.Type, "16", 2);
180180 memset (&pnt->STATUS_Frm.ip_addr, 0x00, 16);
181181 #if __WORDSIZE == 64
182182 time (&pnt->STATUS_Frm.EntryUpdateTime);
@@ -225,7 +225,7 @@ void status_send_update (struct ModuleTable *pnt)
225225 memcpy (&pnt->STATUS_Frm_Save, &pnt->STATUS_Frm.body, 64);
226226 memcpy (&pnt->STATUS_Frm.StatusID, "DSTRST", 6);
227227 memcpy (&pnt->STATUS_Frm.Type, "07", 2);
228- //if (pnt->rs_flag == 'R') memcpy (&pnt->STATUS_Frm.Type, "17", 2);
228+ if (pnt->rs_flag == 'R') memcpy (&pnt->STATUS_Frm.Type, "17", 2);
229229 memset (&pnt->STATUS_Frm.ip_addr, 0x00, 16);
230230 #if __WORDSIZE == 64
231231 time (&pnt->STATUS_Frm.EntryUpdateTime);