コミットメタ情報

リビジョン820d278de01215cde16befcb8dd332de58d0a804 (tree)
日時2019-11-02 01:13:23
作者Satoshi Yasuda <yasuda@jk1z...>
コミッターSatoshi Yasuda

ログメッセージ

modified: forward_in.c

変更サマリ

差分

--- a/forward_in.c
+++ b/forward_in.c
@@ -324,16 +324,17 @@ void multi_connect (void)
324324 if (rp->ai_family == AF_INET)
325325 {
326326 if (((struct sockaddr_in *)(rp->ai_addr))->sin_addr.s_addr
327- == multi_addr.sin_addr.s_addr) goto next;
327+ == multi_addr.sin_addr.s_addr)
328+ {
329+ freeaddrinfo (result);
330+ read_hole_punch(&multi_buff, length);
331+ return;
332+ }
328333 }
329334 }
330335 freeaddrinfo (result);
331336 }
332337 return;
333-next:
334- freeaddrinfo (result);
335- read_hole_punch(&multi_buff, length);
336- return;
337338 }
338339
339340 if (length < 16) return;
@@ -360,17 +361,20 @@ next:
360361 send_invalid_call (&multi_buff.multi_buffer[16], multi_addr);
361362 return;
362363 }
363- next = MultiConnectTablePnt;
364+ next = MultiConnectTablePnt; // keep alive
364365 while (next)
365366 {
366367 if ((multi_addr.sin_addr.s_addr == next->multi_addr.sin_addr.s_addr)
367368 && (multi_addr.sin_port == next->multi_addr.sin_port))
368369 {
369- memcpy (next->auth_callsign, &multi_buff.multi_buffer[16], 8);
370- send_inquire(&multi_buff.multi_buffer[16]);
371- next->auth = AUTH_WAIT;
372- gettimeofday (&next->AuthInquireTime, NULL);
373- time (&next->AccessTime);
370+ time(&next->AccessTime);
371+ if (next->auth != AUTH_TRUE)
372+ {
373+ memcpy (next->auth_callsign, &multi_buff.multi_buffer[16], 8);
374+ send_inquire(&multi_buff.multi_buffer[16]);
375+ next->auth = AUTH_WAIT;
376+ gettimeofday (&next->AuthInquireTime, NULL);
377+ }
374378 break;
375379 }
376380 next = next->f_chain;
@@ -378,21 +382,6 @@ next:
378382 return;
379383 }
380384
381- next = MultiConnectTablePnt;
382- while (next)
383- {
384- if ((multi_addr.sin_addr.s_addr == next->multi_addr.sin_addr.s_addr)
385- && (multi_addr.sin_port == next->multi_addr.sin_port))
386- {
387- time (&next->AccessTime);
388- next->in++;
389- if (next->auth == AUTH_FALSE) return; // connect not permit
390- break;
391- }
392- next = next->f_chain;
393- }
394- if (next == NULL) return;
395-
396385 if (!memcmp (multi_buff.d_packet.id, "DSTR", 4))
397386 {
398387 if (((multi_buff.d_packet.c & C_MASK) == VOICE)
旧リポジトリブラウザで表示