コミットメタ情報

リビジョン7b0e02c43ca35a9008f32acf6fe4086e01be48ff (tree)
日時2019-09-12 07:37:16
作者root <root@loca...>
コミッターroot

ログメッセージ

modified: forward_in.c
modified: main.c
modified: multi_forward_utils.c

変更サマリ

差分

--- a/forward_in.c
+++ b/forward_in.c
@@ -199,21 +199,26 @@ skip:
199199 fflush (log_file);
200200 }
201201 next->out++;
202- if (forward_buff.d_packet.trunk.FrameSeq == 0x14)
203- {
204- ret = sendto (multi_sd, &ar_call_next->rf_header, 58, 0,
205- (struct sockaddr *)&next->multi_addr, sizeof(struct sockaddr));
206- if (ret == -1)
207- {
208- time(&atime);
209- fprintf (log_file, "%24.24s fwd->mult (RF header) error %s\n", ctime(&atime), strerror(errno));
210- fflush (log_file);
211- }
212- next->out++;
213-
214- }
215202 next = next->f_chain;
216203 }
204+ next = MultiConnectTablePnt;
205+ while (next)
206+ {
207+ if (forward_buff.d_packet.trunk.FrameSeq == 0x14)
208+ {
209+ ret = sendto (multi_sd, &ar_call_next->rf_header, 58, 0,
210+ (struct sockaddr *)&next->multi_addr, sizeof(struct sockaddr));
211+ if (ret == -1)
212+ {
213+ time(&atime);
214+ fprintf (log_file, "%24.24s fwd->mult (RF header) error %s\n", ctime(&atime), strerror(errno));
215+ fflush (log_file);
216+ }
217+ next->out++;
218+
219+ }
220+ next = next->f_chain;
221+ }
217222 return TRUE;
218223 }
219224
@@ -484,18 +489,6 @@ send:
484489 fflush (log_file);
485490 }
486491 next->out++;
487- if ((multi_buff.d_packet.trunk.FrameSeq == 0x14) && ar_call_next)
488- {
489- ret = sendto (multi_sd, &ar_call_next->rf_header, 58, 0,
490- (struct sockaddr *)&next->multi_addr, sizeof(struct sockaddr));
491- if (ret == -1)
492- {
493- time(&atime);
494- fprintf (log_file, "%24.24s mult(RF header) error %s\n", ctime(&atime), strerror(errno));
495- fflush (log_file);
496- }
497- next->out++;
498- }
499492 }
500493 else
501494 {
@@ -505,6 +498,26 @@ send:
505498 }
506499 next = next->f_chain;
507500 }
501+ next = MultiConnectTablePnt;
502+ while (next)
503+ {
504+ if (memcmp (&next->multi_addr, &multi_addr, sizeof(multi_addr)))
505+ {
506+ if ((multi_buff.d_packet.trunk.FrameSeq == 0x14) && ar_call_next)
507+ {
508+ ret = sendto (multi_sd, &ar_call_next->rf_header, 58, 0,
509+ (struct sockaddr *)&next->multi_addr, sizeof(struct sockaddr));
510+ if (ret == -1)
511+ {
512+ time(&atime);
513+ fprintf (log_file, "%24.24s mult(RF header) error %s\n", ctime(&atime), strerror(errno));
514+ fflush (log_file);
515+ }
516+ next->out++;
517+ }
518+ }
519+ next = next->f_chain;
520+ }
508521 if (multi_buff.d_packet.trunk.FrameSeq & 0x40)
509522 {
510523 status_off (ar_call_next->ar_callsign);
--- a/main.c
+++ b/main.c
@@ -148,7 +148,6 @@ int main(int argc, char** argv)
148148 skip: continue;
149149 }
150150 }
151-
152151 }
153152 trust_resp_check();
154153 next = MultiConnectTablePnt;
@@ -173,7 +172,7 @@ int main(int argc, char** argv)
173172 end:
174173 time(&atime);
175174 uptime = atime - start_time;
176- fprintf (log_file, "%24.24s D-STAR X-change (xchange) add on status terminated (Up : %ldd%2ldh%2ldm%2lds)\n\n",
175+ fprintf (log_file, "%24.24s D-STAR X-change (xchange) add on multi forward_terminated (Up : %ldd%2ldh%2ldm%2lds)\n\n",
177176 ctime(&atime),
178177 (uptime / 86400),
179178 ((uptime % 86400) / 3600),
--- a/multi_forward_utils.c
+++ b/multi_forward_utils.c
@@ -298,11 +298,14 @@ void hole_punch_interval_reset (char buff[])
298298 nat_port = atoi (&buff[4]);
299299 if (nat_port != hole_punch_port_save)
300300 {
301+ fprintf (log_file, "%24.24s port number changed %d -> %d\n",
302+ hole_punch_port_save, nat_port);
303+ fflush (log_file);
304+ hole_punch_port_save = nat_port;
301305 if (hole_punch_interval == 20) hole_punch_interval = 10;
302306 else if (hole_punch_interval == 10) hole_punch_interval =5;
303307 else if (hole_punch_interval == 5) hole_punch_interval = 2;
304308 else if (hole_punch_interval == 2) hole_punch_interval = 1;
305- hole_punch_port_save = nat_port;
306309 }
307310 }
308311
旧リポジトリブラウザで表示