update last_connection_create
authort3sserakt <t3ss@posteo.de>
Wed, 29 Jan 2020 18:16:33 +0000 (19:16 +0100)
committert3sserakt <t3ss@posteo.de>
Wed, 29 Jan 2020 18:16:33 +0000 (19:16 +0100)
src/cadet/gnunet-service-cadet_peer.c

index 475e60ddb8fc2401f127635debfa369c9e2e081b..2376d6af532274e4b55718d5826c4bc1859a0775 100644 (file)
@@ -1567,9 +1567,13 @@ GCP_update_monotime (struct CadetPeer *peer)
 int 
 GCP_check_monotime (struct CadetPeer *peer, struct GNUNET_TIME_AbsoluteNBO monotime)
 {
+
+  struct GNUNET_TIME_Absolute mt = GNUNET_TIME_absolute_ntoh(monotime);
   
-  if (GNUNET_TIME_absolute_ntoh(monotime).abs_value_us > *(&peer->last_connection_create.abs_value_us))
+  if (mt.abs_value_us > *(&peer->last_connection_create.abs_value_us)){
+    peer->last_connection_create = mt;
     return GNUNET_YES;
+  }
   return GNUNET_NO;
 }