• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Keine Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revisioneae425b547d1e1454d3e3a74315afb00fc90e13b (tree)
Zeit2022-07-11 12:53:59
AutorSatoshi Yasuda <7m3tjz@jarl...>
CommiterSatoshi Yasuda

Log Message

modified: dmonitor_utils.c
modified: main.c

Ändern Zusammenfassung

Diff

--- a/dmonitor_utils.c
+++ b/dmonitor_utils.c
@@ -314,6 +314,7 @@ void send_keep_alive(void)
314314 {
315315 int k;
316316 int n;
317+ int ret;
317318 char buff[88];
318319 struct hostent *host;
319320
@@ -330,8 +331,9 @@ void send_keep_alive(void)
330331 memset (buff, 0x00, sizeof(buff));
331332 memcpy (&buff[20], connect_call, 8);
332333 sprintf (&buff[4], "%s", inet_ntoa (in_addr.sin_addr));
333- sendto(in_addr_sock, &buff[4], 24, MSG_DONTWAIT,
334+ ret =sendto(in_addr_sock, &buff[4], 24, MSG_DONTWAIT,
334335 (struct sockaddr *)&in_addr, sizeof(in_addr));
336+ syslog (LOG_DEBUG, "sendto length:%d", ret);
335337 time(&hole_punch_send_time);
336338
337339 memcpy (&buff[20], "dmoni", 5);
@@ -361,8 +363,9 @@ void send_keep_alive(void)
361363 memcpy (&buff[72], zone_call, 7);
362364 memcpy (&buff[80], connect_call, 8);
363365 buff[79] = 0x20;
364- sendto(in_addr_sock, buff, 88, MSG_DONTWAIT,
366+ ret = sendto(in_addr_sock, buff, 88, MSG_DONTWAIT,
365367 (struct sockaddr *)&in_addr, sizeof(in_addr));
368+ syslog (LOG_DEBUG, "sendto length:%d", ret);
366369 time(&hole_punch_send_time);
367370 time(&dest_keep_alive_send_time);
368371 }
--- a/main.c
+++ b/main.c
@@ -223,12 +223,13 @@ os_ok:
223223 else if (!memcmp (argv[5], "NO_DAEMON", 9)) no_daemon = TRUE;
224224 else
225225 {
226- memcpy (zone_call, argv[4], strlen(argv[4]));
226+ memcpy (zone_call, argv[5], strlen(argv[5]));
227227 zone_call[7] = 'G';
228228 }
229229 }
230230 if (argc == 7)
231231 {
232+ memcpy (zone_call, argv[5], strlen(argv[5]));
232233 if (!memcmp (argv[6], "SCAN", 4)) scan_sw = TRUE;
233234 else if (!memcmp (argv[6], "NO_DAEMON", 9)) no_daemon = TRUE;
234235 }