aboutsummaryrefslogtreecommitdiff
path: root/src/core/gnunet-service-core_kx.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-03-03 08:14:37 +0000
committerChristian Grothoff <christian@grothoff.org>2013-03-03 08:14:37 +0000
commit6145ab509a3036b17f350b0dc2c0e2c6edd9c96b (patch)
treebf73e06b43632f0f58ab1e7296ab7e97f25e681e /src/core/gnunet-service-core_kx.c
parentb336a3030187b189cfc9b11f9ee1362054616a4b (diff)
downloadgnunet-6145ab509a3036b17f350b0dc2c0e2c6edd9c96b.tar.gz
gnunet-6145ab509a3036b17f350b0dc2c0e2c6edd9c96b.zip
reduce messages in initial KX
Diffstat (limited to 'src/core/gnunet-service-core_kx.c')
-rw-r--r--src/core/gnunet-service-core_kx.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/core/gnunet-service-core_kx.c b/src/core/gnunet-service-core_kx.c
index 07f51cb49..d5e8a20d4 100644
--- a/src/core/gnunet-service-core_kx.c
+++ b/src/core/gnunet-service-core_kx.c
@@ -671,8 +671,15 @@ GSC_KX_start (const struct GNUNET_PeerIdentity *pid)
671 GNUNET_CONTAINER_DLL_insert (kx_head, 671 GNUNET_CONTAINER_DLL_insert (kx_head,
672 kx_tail, 672 kx_tail,
673 kx); 673 kx);
674 kx->status = KX_STATE_KEY_SENT; 674 if (0 < GNUNET_CRYPTO_hash_cmp (&pid->hashPubKey,
675 send_key (kx); 675 &GSC_my_identity.hashPubKey))
676 {
677 /* peer with "lower" identity starts KX, otherwise we typically end up
678 with both peers starting the exchange and transmit the 'set key'
679 message twice */
680 kx->status = KX_STATE_KEY_SENT;
681 send_key (kx);
682 }
676 return kx; 683 return kx;
677} 684}
678 685