• 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

Revisionfdb739c52cda7bfab775ae11e0ac599153634041 (tree)
Zeit2021-10-17 20:09:35
AutorSatoshi Yasuda <7m3tjz;jarl.com>
CommiterSatoshi Yasuda

Log Message

modified: dstatus_utils.c
modified: read_config.c
modified: rep_send.c
modified: repeater.c
modified: status_send.c

Ändern Zusammenfassung

Diff

--- a/dstatus_utils.c
+++ b/dstatus_utils.c
@@ -34,34 +34,6 @@ void pselectSet(void)
3434 timeout.tv_sec = 0;
3535 timeout.tv_nsec = 10000000;
3636 }
37-/*
38-void module_delete (char FrameID[], char flag)
39-{
40- struct ModuleTable *pnt;
41- struct ModuleTable *prev;
42-
43- pnt = module_pnt;
44- prev = NULL;
45- while (pnt)
46- {
47- if (!memcmp (FrameID, pnt->FrameID, 2) && (flag == pnt->rs_glag))
48- {
49- if (pnt == module_pnt)
50- {
51- module_pnt = pnt->f_chain;
52- }
53- else
54- {
55- prev->f_chain = pnt->f_chain;
56- }
57- free (pnt);
58- return;
59- }
60- prev = pnt;
61- pnt = pnt->f_chain;
62- }
63-}
64-*/
6537
6638 void module_pass_check (void)
6739 {
--- a/read_config.c
+++ b/read_config.c
@@ -1,6 +1,6 @@
11 #include "dstatus.h"
22
3-void module_init(struct ModuleTable *module, char Module[]);
3+void module_init(struct ModuleTable *module, char Module[], char flag);
44 void status_init (struct status *sta, char Fullname[], int port);
55
66
@@ -148,7 +148,7 @@ int read_config(int argc, char **argv)
148148
149149 }
150150
151-void module_init(struct ModuleTable *module, char Module[])
151+void module_init(struct ModuleTable *module, char Module[], char flag)
152152 {
153153 module->AccessTime = 0;
154154 memcpy (module->ModuleName, Module, 8);
@@ -165,6 +165,8 @@ void module_init(struct ModuleTable *module, char Module[])
165165 module->recv_time.tv_sec = 0;
166166 module->recv_time.tv_usec = 0;
167167 module->lost_cnt = 0;
168+ module->rs_flag = flag;
169+printf ("debug 200 %8.8s %c\n", module->ModuleName, module->rs_flag);
168170 }
169171
170172 void status_init (struct status *sta, char FullName[], int port)
--- a/rep_send.c
+++ b/rep_send.c
@@ -6,7 +6,6 @@ void status_send_ptton(struct ModuleTable *pnt);
66 void status_send_pttoff(struct ModuleTable *pnt);
77 void status_send_update (struct ModuleTable *pnt);
88
9-struct ModuleTable *module_check_ex (unsigned char FrameID[], in_addr_t ipaddr, in_port_t port);
109
1110 extern struct sockaddr_in in_sock;
1211 extern int len_in_sock;
--- a/repeater.c
+++ b/repeater.c
@@ -10,7 +10,7 @@ extern struct sockaddr_in in_sock;
1010 extern socklen_t len_in_sock;
1111
1212 int rpt_mon_sd;
13-char mon_frame_id[2] = {0x00, 0x00};
13+//char mon_frame_id[2] = {0x00, 0x00};
1414
1515 union
1616 {
@@ -73,11 +73,13 @@ int repeater_mon(void)
7373 //&& ((mon_buff.d_packet.trunk.FrameSeq & 0x3f) < 21)) // check D-STAR packet (DSTR)
7474 {
7575 mon_reply((char *)&mon_buff);
76- if (mon_buff.d_packet.c & 0x80) flag = 'G';
76+
77+ if (mon_buff.d_packet.c & 0x80) flag = 'R';
7778 else flag = 'S';
7879 if (length == 58)
7980 {
80- m_pnt = module_check(mon_buff.d_packet.body.header.rpt1, flag);
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);
8183 if (m_pnt)
8284 {
8385 memcpy (&m_pnt->rpt_save, &mon_buff, 58);
@@ -91,8 +93,6 @@ int repeater_mon(void)
9193 timeradd (&cur_time, &time_21ms, &m_pnt->recv_time);
9294 m_pnt->lost_cnt = 0;
9395 }
94- //if ((mon_buff.d_packet.body.header.rpt2[7] != 'G'))
95- memcpy (mon_frame_id, mon_buff.d_packet.trunk.FrameID, 2);
9696 }
9797 else if (length == 29) // voice packet ICOM
9898 {
--- a/status_send.c
+++ b/status_send.c
@@ -88,7 +88,7 @@ void status_send_ptton(struct ModuleTable *pnt)
8888 sta_pnt = status_pnt;
8989 memcpy (&pnt->STATUS_Frm.StatusID, "DSTRST", 6);
9090 memcpy (&pnt->STATUS_Frm.Type, "05", 2);
91- if (pnt->rs_flag == 'G') memcpy (&pnt->STATUS_Frm.Type, "15", 2);
91+ if (pnt->rs_flag == 'R') memcpy (&pnt->STATUS_Frm.Type, "15", 2);
9292 memcpy (&pnt->STATUS_Frm.body.status.RPT2Call, &pnt->rpt_save.body.header.rpt2, 36);
9393 memset (&pnt->STATUS_Frm.ip_addr, 0x00, 16);
9494 #if __WORDSIZE == 64
@@ -120,7 +120,7 @@ void status_send_pttoff (struct ModuleTable *pnt)
120120
121121 memcpy (&pnt->STATUS_Frm.StatusID, "DSTRST", 6);
122122 memcpy (&pnt->STATUS_Frm.Type, "06", 2);
123- if (pnt->rs_flag == 'G') memcpy (&pnt->STATUS_Frm.Type, "16", 2);
123+ if (pnt->rs_flag == 'R') memcpy (&pnt->STATUS_Frm.Type, "16", 2);
124124 memset (&pnt->STATUS_Frm.ip_addr, 0x00, 16);
125125 #if __WORDSIZE == 64
126126 time (&pnt->STATUS_Frm.EntryUpdateTime);
@@ -153,7 +153,7 @@ void status_send_update (struct ModuleTable *pnt)
153153 memcpy (&pnt->STATUS_Frm_Save, &pnt->STATUS_Frm.body, 64);
154154 memcpy (&pnt->STATUS_Frm.StatusID, "DSTRST", 6);
155155 memcpy (&pnt->STATUS_Frm.Type, "07", 2);
156- if (pnt->rs_flag == 'G') memcpy (&pnt->STATUS_Frm.Type, "17", 2);
156+ if (pnt->rs_flag == 'R') memcpy (&pnt->STATUS_Frm.Type, "17", 2);
157157 memset (&pnt->STATUS_Frm.ip_addr, 0x00, 16);
158158 #if __WORDSIZE == 64
159159 time (&pnt->STATUS_Frm.EntryUpdateTime);