• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Keine Tags

Frequently used words (click to add to your profile)

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

Commit MetaInfo

Revision51f30bf3d428ebadb01d1e4451d4587efd51a9ab (tree)
Zeit2022-07-11 01:40:49
AutorSatoshi Yasuda <7m3tjz@jarl...>
CommiterSatoshi Yasuda

Log Message

modified: dmonitor.h
modified: dmonitor_utils.c
modified: extern_dmonitor.h
modified: main.c
modified: repeater_mon.c

Ändern Zusammenfassung

Diff

--- a/config.h
+++ b/config.h
@@ -102,7 +102,7 @@
102102 #define PACKAGE_NAME "dmonitor"
103103
104104 /* Define to the full name and version of this package. */
105-#define PACKAGE_STRING "dmonitor 02.00"
105+#define PACKAGE_STRING "dmonitor 01.80"
106106
107107 /* Define to the one symbol short name of this package. */
108108 #define PACKAGE_TARNAME "dmonitor"
@@ -111,13 +111,13 @@
111111 #define PACKAGE_URL ""
112112
113113 /* Define to the version of this package. */
114-#define PACKAGE_VERSION "02.00"
114+#define PACKAGE_VERSION "01.80"
115115
116116 /* Define to 1 if you have the ANSI C header files. */
117117 #define STDC_HEADERS 1
118118
119119 /* Version number of package */
120-#define VERSION "02.00"
120+#define VERSION "01.80"
121121
122122 /* Define for Solaris 2.5.1 so the uint32_t typedef from <sys/synch.h>,
123123 <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
11 #! /bin/sh
22 # Guess values for system-dependent variables and create Makefiles.
3-# Generated by GNU Autoconf 2.69 for dmonitor 02.00.
3+# Generated by GNU Autoconf 2.69 for dmonitor 01.80.
44 #
55 # Report bugs to <7m3tjz@jarl.com>.
66 #
@@ -580,8 +580,8 @@ MAKEFLAGS=
580580 # Identity of this package.
581581 PACKAGE_NAME='dmonitor'
582582 PACKAGE_TARNAME='dmonitor'
583-PACKAGE_VERSION='02.00'
584-PACKAGE_STRING='dmonitor 02.00'
583+PACKAGE_VERSION='01.80'
584+PACKAGE_STRING='dmonitor 01.80'
585585 PACKAGE_BUGREPORT='7m3tjz@jarl.com'
586586 PACKAGE_URL=''
587587
@@ -1277,7 +1277,7 @@ if test "$ac_init_help" = "long"; then
12771277 # Omit some internal or obsolete options to make the list less imposing.
12781278 # This message is too long to be a string in the A/UX 3.1 sh.
12791279 cat <<_ACEOF
1280-\`configure' configures dmonitor 02.00 to adapt to many kinds of systems.
1280+\`configure' configures dmonitor 01.80 to adapt to many kinds of systems.
12811281
12821282 Usage: $0 [OPTION]... [VAR=VALUE]...
12831283
@@ -1344,7 +1344,7 @@ fi
13441344
13451345 if test -n "$ac_init_help"; then
13461346 case $ac_init_help in
1347- short | recursive ) echo "Configuration of dmonitor 02.00:";;
1347+ short | recursive ) echo "Configuration of dmonitor 01.80:";;
13481348 esac
13491349 cat <<\_ACEOF
13501350
@@ -1435,7 +1435,7 @@ fi
14351435 test -n "$ac_init_help" && exit $ac_status
14361436 if $ac_init_version; then
14371437 cat <<\_ACEOF
1438-dmonitor configure 02.00
1438+dmonitor configure 01.80
14391439 generated by GNU Autoconf 2.69
14401440
14411441 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1912,7 +1912,7 @@ cat >config.log <<_ACEOF
19121912 This file contains any messages produced by compilers while
19131913 running configure, to aid debugging if configure makes a mistake.
19141914
1915-It was created by dmonitor $as_me 02.00, which was
1915+It was created by dmonitor $as_me 01.80, which was
19161916 generated by GNU Autoconf 2.69. Invocation command line was
19171917
19181918 $ $0 $@
@@ -2773,7 +2773,7 @@ fi
27732773
27742774 # Define the identity of the package.
27752775 PACKAGE='dmonitor'
2776- VERSION='02.00'
2776+ VERSION='01.80'
27772777
27782778
27792779 cat >>confdefs.h <<_ACEOF
@@ -5043,7 +5043,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50435043 # report actual input values of CONFIG_FILES etc. instead of their
50445044 # values after options handling.
50455045 ac_log="
5046-This file was extended by dmonitor $as_me 02.00, which was
5046+This file was extended by dmonitor $as_me 01.80, which was
50475047 generated by GNU Autoconf 2.69. Invocation command line was
50485048
50495049 CONFIG_FILES = $CONFIG_FILES
@@ -5109,7 +5109,7 @@ _ACEOF
51095109 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51105110 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
51115111 ac_cs_version="\\
5112-dmonitor config.status 02.00
5112+dmonitor config.status 01.80
51135113 configured by $0, generated by GNU Autoconf 2.69,
51145114 with options \\"\$ac_cs_config\\"
51155115
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
1+dmonitor (01.80) unstable; urgency=low
2+
3+ * bug fixed typo
4+
5+ -- Satoshi Yasuda <7m3tjz@jarl.com> Sun, 26 Jun 2022 00:00:00 +0900
6+
17 dmonitor (01.79) unstable; urgency=low
28
39 * update Closes: (#139)
--- a/dmonitor.h
+++ b/dmonitor.h
@@ -113,7 +113,6 @@ int rig_buff_next;
113113
114114 int dest_inet_port;
115115 char *dest_address;
116-char *server_address;
117116 char inet_send_buff[58];
118117 int m_seq;
119118 int frameID;
--- a/dmonitor_utils.c
+++ b/dmonitor_utils.c
@@ -266,6 +266,33 @@ int send_dest_keep_alive (void)
266266
267267 in_addr.sin_family = AF_INET;
268268 in_addr.sin_port = htons(dest_inet_port);
269+ //in_addr.sin_port = htons(51000);
270+ in_addr.sin_addr.s_addr = inet_addr(dest_address);
271+ if (in_addr.sin_addr.s_addr == 0xffffffff)
272+ {
273+ host = gethostbyname(dest_address);
274+ if (host == NULL) return FALSE;
275+ in_addr.sin_addr.s_addr = *(unsigned int *)host->h_addr_list[0];
276+ }
277+ memset (buff, 0x00, sizeof(buff));
278+ memcpy (&buff[20], connect_call, 8);
279+ sprintf (&buff[4], "%s", inet_ntoa (in_addr.sin_addr));
280+ sendto(in_addr_sock, &buff[4], 24, MSG_DONTWAIT,
281+ (struct sockaddr *)&in_addr, sizeof(in_addr));
282+ time(&hole_punch_send_time);
283+ time(&dest_keep_alive_send_time);
284+ return TRUE;
285+}
286+
287+int alt_send_dest_keep_alive (void)
288+{
289+ int k;
290+ int n;
291+ char buff[80];
292+ struct hostent *host;
293+
294+ in_addr.sin_family = AF_INET;
295+ in_addr.sin_port = htons(40000); // dv port
269296 in_addr.sin_addr.s_addr = inet_addr(dest_address);
270297 if (in_addr.sin_addr.s_addr == 0xffffffff)
271298 {
@@ -292,6 +319,7 @@ void send_keep_alive(void)
292319
293320 in_addr.sin_family = AF_INET;
294321 in_addr.sin_port = htons(dest_inet_port);
322+ //in_addr.sin_port = htons(40000);
295323 in_addr.sin_addr.s_addr = inet_addr(dest_address);
296324 if (in_addr.sin_addr.s_addr == 0xffffffff)
297325 {
@@ -321,12 +349,10 @@ void send_keep_alive(void)
321349
322350 in_addr.sin_family = AF_INET;
323351 in_addr.sin_port = htons(hole_punch_port);
324- //in_addr.sin_addr.s_addr = inet_addr(hole_punch_server);
325- in_addr.sin_addr.s_addr = inet_addr(server_address);
326-syslog(LOG_DEBUG, "%s", server_address);
352+ in_addr.sin_addr.s_addr = inet_addr(hole_punch_server);
327353 if (in_addr.sin_addr.s_addr == 0xffffffff)
328354 {
329- host = gethostbyname(server_address);
355+ host = gethostbyname(hole_punch_server);
330356 if (host == NULL) return;
331357 in_addr.sin_addr.s_addr = *(unsigned int *)host->h_addr_list[0];
332358 }
@@ -745,6 +771,7 @@ void dmonitor_close (void)
745771
746772 in_addr.sin_family = AF_INET;
747773 in_addr.sin_port = htons(dest_inet_port);
774+ //in_addr.sin_port = htons(51000);
748775 in_addr.sin_addr.s_addr = inet_addr(dest_address);
749776 if (in_addr.sin_addr.s_addr == 0xffffffff)
750777 {
--- a/extern_dmonitor.h
+++ b/extern_dmonitor.h
@@ -113,7 +113,6 @@ extern int rig_buff_next;
113113
114114 extern int dest_inet_port;
115115 extern char *dest_address;
116-extern char *server_address;
117116 extern char inet_send_buff[58];
118117 extern int m_seq;
119118 extern int frameID;
--- a/main.c
+++ b/main.c
@@ -137,10 +137,8 @@ int main(int argc, char *argv[])
137137 invalid_os ();
138138 return -1;
139139 os_ok:
140-syslog (LOG_DEBUG, "debug 100");
141140 fclose (os_release_file);
142141 right_os ();
143-syslog (LOG_DEBUG, "debug 110");
144142
145143 dmonitor_file = fopen (DMONITOR_FILE, "r");
146144 if (dmonitor_file == NULL)
@@ -188,7 +186,7 @@ syslog (LOG_DEBUG, "debug 110");
188186 if (length <= 0 ) return -1;
189187 pg_path[length] = 0x00;
190188 if (ETagGen (pg_path, MD5_dmonitor) < 0) return 5;
191- //memcpy (MD5_dmonitor, "5ebe211107266a57b1af14a7fdcd8480", 32);
189+ memcpy (MD5_dmonitor, "5ebe211107266a57b1af14a7fdcd8480", 32);
192190
193191 Rp = malloc (sizeof (struct FifoPkt) - 1024);
194192 Wp = Rp;
@@ -198,10 +196,10 @@ syslog (LOG_DEBUG, "debug 110");
198196 recv_frame_seq = 0x00;
199197
200198 memset (connect_call, 0x20, 8);
201- if (argc < 6)
199+ if (argc < 5)
202200 {
203201 syslog (LOG_ERR,
204- "Usage dmonitor my_call ip_address port area_call zone_call server_ip");
202+ "Usage dmonitor my_call ip_address port area_call [zone_call]");
205203 return 5;
206204 }
207205 len = strlen(argv[1]);
@@ -215,29 +213,27 @@ syslog (LOG_DEBUG, "debug 110");
215213 }
216214 memcpy (connect_call, argv[1], len);
217215 dest_address = argv[2];
218- server_address = argv[6];
219-printf ("%s %s\n", argv[6], server_address);
220216 dest_inet_port = (unsigned short)atoi(argv[3]);
221217 memcpy (area_call, argv[4], strlen(argv[4]));
222218 memcpy (zone_call, argv[4], strlen(argv[4]));
223219 zone_call[7] = 'G';
224- if (argc == 7)
220+ if (argc == 6)
225221 {
226- if (!memcmp (argv[6], "SCAN", 4)) scan_sw = TRUE;
227- else if (!memcmp (argv[6], "NO_DAEMON", 9)) no_daemon = TRUE;
222+ if (!memcmp (argv[5], "SCAN", 4)) scan_sw = TRUE;
223+ else if (!memcmp (argv[5], "NO_DAEMON", 9)) no_daemon = TRUE;
228224 else
229225 {
230- memcpy (zone_call, argv[5], strlen(argv[5]));
226+ memcpy (zone_call, argv[4], strlen(argv[4]));
231227 zone_call[7] = 'G';
232228 }
233229 }
234- if (argc == 8)
230+ if (argc == 7)
235231 {
236- if (!memcmp (argv[7], "SCAN", 4)) scan_sw = TRUE;
237- else if (!memcmp (argv[7], "NO_DAEMON", 9)) no_daemon = TRUE;
232+ if (!memcmp (argv[6], "SCAN", 4)) scan_sw = TRUE;
233+ else if (!memcmp (argv[6], "NO_DAEMON", 9)) no_daemon = TRUE;
238234 }
239235
240- if (argc >= 6) send_sw = TRUE;
236+ if (argc >= 5) send_sw = TRUE;
241237 if (!scan_sw)
242238 {
243239 if (!no_daemon) ret = daemon(0, 0);
@@ -353,7 +349,6 @@ printf ("%s %s\n", argv[6], server_address);
353349 }
354350
355351 dest_keep_alive_cnt= 0;
356-
357352 memset (short_msg, 0x20, 20);
358353 memset (used_call, 0x20, 8);
359354 memset (used_call2, 0x20, 4);
@@ -415,7 +410,7 @@ top:
415410 if (hole_punch_send_interval == HOLE_PUNCH_SEND_INTERVAL)
416411 {
417412 hole_punch_send_cnt++;
418- if (hole_punch_send_cnt >= 20)
413+ if (hole_punch_send_cnt >= 5)
419414 {
420415 sprintf (msg_temp, "NOT LINKED %8.8s ", area_call);
421416 memcpy (mycall2, "NOLK", 4);
@@ -434,7 +429,12 @@ top:
434429 error_msg ("ERROR接続処理中です");
435430 }
436431 }
432+ #ifdef _ALT_HOLE_PUNCH
433+ if (hole_punch_send_cnt < 3) send_dest_keep_alive();
434+ else alt_send_dest_keep_alive();
435+ #else
437436 send_dest_keep_alive();
437+ #endif
438438 }
439439 if (dest_keep_alive_send_time)
440440 {
--- a/repeater_mon.c
+++ b/repeater_mon.c
@@ -62,7 +62,7 @@ void prase (char str[])
6262 char callsign[8];
6363 char call[64];
6464 char ip_addr[20];
65- char server_ip[20];
65+ //char server_ip[20];
6666 int port;
6767 char rep_temp[128];
6868 char ur_call[8];
@@ -98,6 +98,7 @@ void prase (char str[])
9898 ip_addr[m++] = str[n];
9999 }
100100 }
101+ #if 0
101102 else if (!memcmp (&str[k], "server_ip", 9))
102103 {
103104 m = 0;
@@ -111,6 +112,7 @@ void prase (char str[])
111112 server_ip[m++] = str[n];
112113 }
113114 }
115+ #endif
114116 else if (!memcmp (&str[k], "port", 4))
115117 {
116118 port = atoi (&str[k+6]);
@@ -223,21 +225,21 @@ void prase (char str[])
223225 rep_temp[l] = 0x00;
224226 if (status)
225227 {
226- fprintf (html_fd, "<td title=\"rpt1:%8.8s rpt2:%8.8s ur:%8.8s my:%8.8s\"<tt><a href=\"/cgi-bin/monitor?ip_addr=%s&port=%d&callsign='%8.8s'&rep_name='%s'&zr_call='%8.8s'&server_ip=%s\" target=\"cmd1\" style=\"color:red;\">%s</a></tt></td><td>%s</td>\n",
227- rpt1_call, rpt2_call, ur_call, my_call, ip_addr, port, callsign, &rep_temp[8], server_ip, zr_call, call, &rep_temp[8]);
228+ fprintf (html_fd, "<td title=\"rpt1:%8.8s rpt2:%8.8s ur:%8.8s my:%8.8s\"<tt><a href=\"/cgi-bin/monitor?ip_addr=%s&port=%d&callsign='%8.8s'&rep_name='%s'&zr_call='%8.8s'\" target=\"cmd1\" style=\"color:red;\">%s</a></tt></td><td>%s</td>\n",
229+ rpt1_call, rpt2_call, ur_call, my_call, ip_addr, port, callsign, &rep_temp[8], zr_call, call, &rep_temp[8]);
228230 if (active_col == 0)
229231 {
230232 fprintf (html_active_fd, "<table border=\"1\" style=\"font-size:1.0em;\">\n");
231233 fprintf (html_active_fd, "<tr><td><center>Rep. Call</center></td><td><center>Rep. Name</center></td><td><center>GW Call</center></td><td><center>Ur Call</center></td><td><center>My Call</center></td></tr>\n");
232234 }
233- fprintf (html_active_fd, "<tr><td><tt><a href=\"/cgi-bin/monitor?ip_addr=%s&port=%d&callsign='%8.8s'&rep_name='%s'&zr_call='%8.8s'&server_ip=%s\" target=\"cmd1\" style=\"color:red;\">%s</a></tt></td><td>%s</td><td><tt>%8.8s</tt></td><td><tt>%8.8s</tt></td><td><tt>%8.8s</tt></td></tr>\n",
235+ fprintf (html_active_fd, "<tr><td><tt><a href=\"/cgi-bin/monitor?ip_addr=%s&port=%d&callsign='%8.8s'&rep_name='%s'&zr_call='%8.8s'\" target=\"cmd1\" style=\"color:red;\">%s</a></tt></td><td>%s</td><td><tt>%8.8s</tt></td><td><tt>%8.8s</tt></td><td><tt>%8.8s</tt></td></tr>\n",
234236 ip_addr, port, callsign,
235-&rep_temp[8], zr_call, server_ip, call, &rep_temp[8], zr_call, ur_call, my_call);
237+&rep_temp[8], zr_call, call, &rep_temp[8], zr_call, ur_call, my_call);
236238 active_col++;
237239 }
238240 else
239- fprintf (html_fd, "<td><tt><a href=\"/cgi-bin/monitor?ip_addr=%s&port=%d&callsign='%8.8s'&rep_name='%s'&zr_call='%8.8s'&server_ip=%s\" target=\"cmd1\">%s</a></tt></td><td>%s</td>\n",
240- ip_addr, port, callsign, &rep_temp[8], zr_call, server_ip, call, &rep_temp[8]);
241+ fprintf (html_fd, "<td><tt><a href=\"/cgi-bin/monitor?ip_addr=%s&port=%d&callsign='%8.8s'&rep_name='%s'&zr_call='%8.8s'\" target=\"cmd1\">%s</a></tt></td><td>%s</td>\n",
242+ ip_addr, port, callsign, &rep_temp[8], zr_call, call, &rep_temp[8]);
241243
242244 goto mast_close;
243245 }
@@ -245,8 +247,8 @@ void prase (char str[])
245247 }
246248 if (status)
247249 {
248- fprintf (html_fd, "<td title=\"rpt1:%8.8s rpt2:%8.8s ur:%8.8s my:%8.8s\"><tt><a href=\"/cgi-bin/monitor?ip_addr=%s&port=%d&callsign='%8.8s'&zr_call='%8.8s'&server_ip=%s\" target=\"cmd1\" style=\"color:red;\">%s</a></td></tt><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>\n",
249- rpt1_call, rpt2_call, ur_call, my_call, ip_addr, port, callsign, zr_call, server_ip, call);
250+ fprintf (html_fd, "<td title=\"rpt1:%8.8s rpt2:%8.8s ur:%8.8s my:%8.8s\"><tt><a href=\"/cgi-bin/monitor?ip_addr=%s&port=%d&callsign='%8.8s'&zr_call='%8.8s'\" target=\"cmd1\" style=\"color:red;\">%s</a></td></tt><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>\n",
251+ rpt1_call, rpt2_call, ur_call, my_call, ip_addr, port, callsign, zr_call, call);
250252 if (active_col == 0)
251253 {
252254 fprintf (html_active_fd, "<table border=\"1\" style=\"font-size:0.9em;\">\n");
@@ -259,8 +261,8 @@ void prase (char str[])
259261 }
260262 else
261263 {
262- fprintf (html_fd, "<td><tt><a href=\"/cgi-bin/monitor?ip_addr=%s&port=%d&callsign='%8.8s'&zr_call='%8.8s'&server_ip=%s\" target=\"cmd1\">%s</a></tt></td><td></td>\n",
263- ip_addr, port, callsign, zr_call, server_ip, call);
264+ fprintf (html_fd, "<td><tt><a href=\"/cgi-bin/monitor?ip_addr=%s&port=%d&callsign='%8.8s'&zr_call='%8.8s'\" target=\"cmd1\">%s</a></tt></td><td></td>\n",
265+ ip_addr, port, callsign, zr_call, call);
264266 }
265267 mast_close:
266268 fprintf (conn_fd, "%8.8sdmonitor '%8.8s' %s %d '%8.8s' '%8.8s'\n", callsign, ConnectCall, ip_addr, port, callsign, zr_call);