From 6b4db611e93a469b53e2e5344271a716558c5d7a Mon Sep 17 00:00:00 2001 From: xrs Date: Wed, 29 Jan 2020 23:18:39 +0100 Subject: [PATCH] add update of monotime to check method --- src/cadet/gnunet-service-cadet_core.c | 2 +- src/cadet/gnunet-service-cadet_peer.c | 3 ++- src/cadet/gnunet-service-cadet_peer.h | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/cadet/gnunet-service-cadet_core.c b/src/cadet/gnunet-service-cadet_core.c index 45b86a67b..04847f906 100644 --- a/src/cadet/gnunet-service-cadet_core.c +++ b/src/cadet/gnunet-service-cadet_core.c @@ -826,7 +826,7 @@ handle_connection_create ( // Check for CADET state in case the other side has lost the tunnel (xrs,t3ss) if ((GNUNET_YES == msg->has_monotime) && - (GNUNET_YES == GCP_check_monotime(origin, msg->monotime)) && + (GNUNET_YES == GCP_check_and_update_monotime(origin, msg->monotime)) && ( GNUNET_OK == GCP_check_monotime_sig(origin, msg)) && (CADET_TUNNEL_KEY_OK == GCT_get_estate(t))) { diff --git a/src/cadet/gnunet-service-cadet_peer.c b/src/cadet/gnunet-service-cadet_peer.c index 2376d6af5..d3e99741f 100644 --- a/src/cadet/gnunet-service-cadet_peer.c +++ b/src/cadet/gnunet-service-cadet_peer.c @@ -1565,7 +1565,8 @@ GCP_update_monotime (struct CadetPeer *peer) * FIXME: comment */ int -GCP_check_monotime (struct CadetPeer *peer, struct GNUNET_TIME_AbsoluteNBO monotime) +GCP_check_and_update_monotime (struct CadetPeer *peer, + struct GNUNET_TIME_AbsoluteNBO monotime) { struct GNUNET_TIME_Absolute mt = GNUNET_TIME_absolute_ntoh(monotime); diff --git a/src/cadet/gnunet-service-cadet_peer.h b/src/cadet/gnunet-service-cadet_peer.h index 6afec6274..31bd23121 100644 --- a/src/cadet/gnunet-service-cadet_peer.h +++ b/src/cadet/gnunet-service-cadet_peer.h @@ -409,7 +409,7 @@ void GCP_update_monotime (struct CadetPeer *cp); int -GCP_check_monotime (struct CadetPeer *peer, - struct GNUNET_TIME_AbsoluteNBO monotime); +GCP_check_and_update_monotime (struct CadetPeer *peer, + struct GNUNET_TIME_AbsoluteNBO monotime); #endif -- 2.25.1