aboutsummaryrefslogtreecommitdiff
path: root/src/core/gnunet-service-core_kx.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/gnunet-service-core_kx.c')
-rw-r--r--src/core/gnunet-service-core_kx.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/core/gnunet-service-core_kx.c b/src/core/gnunet-service-core_kx.c
index d574d3762..879939b18 100644
--- a/src/core/gnunet-service-core_kx.c
+++ b/src/core/gnunet-service-core_kx.c
@@ -756,7 +756,7 @@ GSC_KX_handle_ephemeral_key (struct GSC_KeyExchangeInfo *kx,
756 if ( ( (KX_STATE_KEY_RECEIVED == kx->status) || 756 if ( ( (KX_STATE_KEY_RECEIVED == kx->status) ||
757 (KX_STATE_UP == kx->status) || 757 (KX_STATE_UP == kx->status) ||
758 (KX_STATE_REKEY_SENT == kx->status) ) && 758 (KX_STATE_REKEY_SENT == kx->status) ) &&
759 (end_t.abs_value <= kx->foreign_key_expires.abs_value) ) 759 (end_t.abs_value_us <= kx->foreign_key_expires.abs_value_us) )
760 { 760 {
761 GNUNET_STATISTICS_update (GSC_stats, gettext_noop ("# old ephemeral keys ignored"), 761 GNUNET_STATISTICS_update (GSC_stats, gettext_noop ("# old ephemeral keys ignored"),
762 1, GNUNET_NO); 762 1, GNUNET_NO);
@@ -796,15 +796,15 @@ GSC_KX_handle_ephemeral_key (struct GSC_KeyExchangeInfo *kx,
796 return; 796 return;
797 } 797 }
798 now = GNUNET_TIME_absolute_get (); 798 now = GNUNET_TIME_absolute_get ();
799 if ( (end_t.abs_value < GNUNET_TIME_absolute_subtract (now, REKEY_TOLERANCE).abs_value) || 799 if ( (end_t.abs_value_us < GNUNET_TIME_absolute_subtract (now, REKEY_TOLERANCE).abs_value_us) ||
800 (start_t.abs_value > GNUNET_TIME_absolute_add (now, REKEY_TOLERANCE).abs_value) ) 800 (start_t.abs_value_us > GNUNET_TIME_absolute_add (now, REKEY_TOLERANCE).abs_value_us) )
801 { 801 {
802 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 802 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
803 _("Ephemeral key message from peer `%s' rejected as its validity range does not match our system time (%llu not in [%llu,%llu]).\n"), 803 _("Ephemeral key message from peer `%s' rejected as its validity range does not match our system time (%llu not in [%llu,%llu]).\n"),
804 GNUNET_i2s (&kx->peer), 804 GNUNET_i2s (&kx->peer),
805 now.abs_value, 805 now.abs_value_us,
806 start_t.abs_value, 806 start_t.abs_value_us,
807 end_t.abs_value); 807 end_t.abs_value_us);
808 return; 808 return;
809 } 809 }
810 if (GNUNET_OK != 810 if (GNUNET_OK !=
@@ -994,7 +994,7 @@ send_keep_alive (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
994 994
995 kx->keep_alive_task = GNUNET_SCHEDULER_NO_TASK; 995 kx->keep_alive_task = GNUNET_SCHEDULER_NO_TASK;
996 left = GNUNET_TIME_absolute_get_remaining (kx->timeout); 996 left = GNUNET_TIME_absolute_get_remaining (kx->timeout);
997 if (0 == left.rel_value) 997 if (0 == left.rel_value_us)
998 { 998 {
999 GNUNET_STATISTICS_update (GSC_stats, 999 GNUNET_STATISTICS_update (GSC_stats,
1000 gettext_noop ("# sessions terminated by timeout"), 1000 gettext_noop ("# sessions terminated by timeout"),
@@ -1300,7 +1300,7 @@ GSC_KX_handle_encrypted_message (struct GSC_KeyExchangeInfo *kx,
1300 1, GNUNET_NO); 1300 1, GNUNET_NO);
1301 return; 1301 return;
1302 } 1302 }
1303 if (0 == GNUNET_TIME_absolute_get_remaining (kx->foreign_key_expires).rel_value) 1303 if (0 == GNUNET_TIME_absolute_get_remaining (kx->foreign_key_expires).rel_value_us)
1304 { 1304 {
1305 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 1305 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
1306 _("Session to peer `%s' went down due to key expiration (should not happen)\n"), 1306 _("Session to peer `%s' went down due to key expiration (should not happen)\n"),
@@ -1394,8 +1394,8 @@ GSC_KX_handle_encrypted_message (struct GSC_KeyExchangeInfo *kx,
1394 1394
1395 /* check timestamp */ 1395 /* check timestamp */
1396 t = GNUNET_TIME_absolute_ntoh (pt->timestamp); 1396 t = GNUNET_TIME_absolute_ntoh (pt->timestamp);
1397 if (GNUNET_TIME_absolute_get_duration (t).rel_value > 1397 if (GNUNET_TIME_absolute_get_duration (t).rel_value_us >
1398 MAX_MESSAGE_AGE.rel_value) 1398 MAX_MESSAGE_AGE.rel_value_us)
1399 { 1399 {
1400 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1400 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1401 "Message received far too old (%s). Content ignored.\n", 1401 "Message received far too old (%s). Content ignored.\n",