aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMartin Schanzenbach <schanzen@gnunet.org>2022-12-01 12:40:05 +0900
committerMartin Schanzenbach <schanzen@gnunet.org>2022-12-01 12:40:05 +0900
commit460cc837899c52fdad3d52492af932a71dd888e3 (patch)
tree371bd67dffb6346aaca8121ee73d608f7a12ba6c /src
parent7edc2569f7ecc0e671e25571a09d2b14d4756d5b (diff)
downloadgnunet-460cc837899c52fdad3d52492af932a71dd888e3.tar.gz
gnunet-460cc837899c52fdad3d52492af932a71dd888e3.zip
-add FIXME to nat service _unregister; fix printf format in tcp communicator
Diffstat (limited to 'src')
-rw-r--r--src/include/gnunet_nat_service.h6
-rw-r--r--src/nat/nat_api.c7
-rw-r--r--src/transport/gnunet-communicator-tcp.c6
3 files changed, 9 insertions, 10 deletions
diff --git a/src/include/gnunet_nat_service.h b/src/include/gnunet_nat_service.h
index e39e2c016..628ca2ef8 100644
--- a/src/include/gnunet_nat_service.h
+++ b/src/include/gnunet_nat_service.h
@@ -385,6 +385,12 @@ GNUNET_NAT_request_reversal (struct GNUNET_NAT_Handle *nh,
385 * handle. This frees the handle, after having sent the needed 385 * handle. This frees the handle, after having sent the needed
386 * commands to close open ports. 386 * commands to close open ports.
387 * 387 *
388 * FIXME: No, the implementation of this API does not do anything beyond
389 * cleaning up the handle.
390 * This is a problem for applications that use #GNUNET_NAT_AddressCallback
391 * and use the app_ctx to store objects, because the callback will never be
392 * called for cleanup on unregister.
393 *
388 * @param nh the handle to unregister 394 * @param nh the handle to unregister
389 */ 395 */
390void 396void
diff --git a/src/nat/nat_api.c b/src/nat/nat_api.c
index 7cf7e6bb3..3072cff7f 100644
--- a/src/nat/nat_api.c
+++ b/src/nat/nat_api.c
@@ -670,13 +670,6 @@ GNUNET_NAT_request_reversal (struct GNUNET_NAT_Handle *nh,
670} 670}
671 671
672 672
673/**
674 * Stop port redirection and public IP address detection for the given
675 * handle. This frees the handle, after having sent the needed
676 * commands to close open ports.
677 *
678 * @param nh the handle to stop
679 */
680void 673void
681GNUNET_NAT_unregister (struct GNUNET_NAT_Handle *nh) 674GNUNET_NAT_unregister (struct GNUNET_NAT_Handle *nh)
682{ 675{
diff --git a/src/transport/gnunet-communicator-tcp.c b/src/transport/gnunet-communicator-tcp.c
index a8dbed604..84aa45b9a 100644
--- a/src/transport/gnunet-communicator-tcp.c
+++ b/src/transport/gnunet-communicator-tcp.c
@@ -1448,7 +1448,7 @@ handshake_ack_monotime_cb (void *cls,
1448 * @param queue The queue context. 1448 * @param queue The queue context.
1449 */ 1449 */
1450static void 1450static void
1451send_challenge (struct GNUNET_CRYPTO_ChallengeNonceP challenge, 1451send_challenge (struct GNUNET_CRYPTO_ChallengeNonceP challenge,
1452 struct Queue *queue) 1452 struct Queue *queue)
1453{ 1453{
1454 struct TCPConfirmationAck tca; 1454 struct TCPConfirmationAck tca;
@@ -1914,10 +1914,10 @@ queue_read (void *cls)
1914 &queue->cread_buf[queue->cread_off], 1914 &queue->cread_buf[queue->cread_off],
1915 BUF_SIZE - queue->cread_off); 1915 BUF_SIZE - queue->cread_off);
1916 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1916 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1917 "Received %lu bytes from TCP queue\n", rcvd); 1917 "Received %zd bytes from TCP queue\n", rcvd);
1918 GNUNET_log_from_nocheck (GNUNET_ERROR_TYPE_DEBUG, 1918 GNUNET_log_from_nocheck (GNUNET_ERROR_TYPE_DEBUG,
1919 "transport", 1919 "transport",
1920 "Received %lu bytes from TCP queue\n", rcvd); 1920 "Received %zd bytes from TCP queue\n", rcvd);
1921 if (-1 == rcvd) 1921 if (-1 == rcvd)
1922 { 1922 {
1923 if ((EAGAIN != errno) && (EINTR != errno)) 1923 if ((EAGAIN != errno) && (EINTR != errno))