/**
* How long to wait before sending another find finger trail request
*/
-#define DHT_FIND_FINGER_TRAIL_INTERVAL GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MILLISECONDS, 50)
+#define DHT_FIND_FINGER_TRAIL_INTERVAL GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MILLISECONDS, 500)
/**
* How long to wait before sending another verify successor message.
*/
-#define DHT_SEND_VERIFY_SUCCESSOR_INTERVAL GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MILLISECONDS, 5)
+#define DHT_SEND_VERIFY_SUCCESSOR_INTERVAL GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MILLISECONDS, 60)
/**
* How long at most to wait for transmission of a request to a friend ?
return GNUNET_OK;
}
}
-
+
+ /* Check if you are already a part of put path. */
+ unsigned int i;
+ for (i = 0; i < putlen; i++)
+ {
+ if(0 == GNUNET_CRYPTO_cmp_peer_identity (&my_identity, &put_path[i]))
+ {
+ putlen = i;
+ break;
+ }
+ }
+
+ /* Add yourself to the list. */
+ struct GNUNET_PeerIdentity pp[putlen + 1];
+ if (0 != (options & GNUNET_DHT_RO_RECORD_ROUTE))
+ {
+ memcpy (pp, put_path, putlen * sizeof (struct GNUNET_PeerIdentity));
+ pp[putlen] = my_identity;
+ putlen++;
+ }
+ else
+ putlen = 0;
+
memcpy (&key_value, &(put->key), sizeof (uint64_t));
if (0 != (GNUNET_CRYPTO_cmp_peer_identity (&best_known_dest, &my_identity)))
{
gettext_noop ("# Next hop to forward the packet not found "
"trail setup request, packet dropped."),
1, GNUNET_NO);
+
GNUNET_break_op (0);
+ //FIXME: Adding put here,only to ensure that process does not hang. but
+ // should not be here. fix the logic.
+ GDS_DATACACHE_handle_put (GNUNET_TIME_absolute_ntoh (put->expiration_time),
+ &(put->key),putlen, pp, ntohl (put->block_type),
+ payload_size, payload);
return GNUNET_OK;
}
+ else
+ {
+ GNUNET_assert (0 != GNUNET_CRYPTO_cmp_peer_identity (&my_identity,
+ next_hop));
+ }
}
else
{
best_known_dest = successor.best_known_destination;
}
- /* Check if you are already a part of put path. */
- unsigned int i;
- for (i = 0; i < putlen; i++)
- {
- if(0 == GNUNET_CRYPTO_cmp_peer_identity (&my_identity, &put_path[i]))
- {
- putlen = i;
- break;
- }
- }
-
- /* Add yourself to the list. */
- struct GNUNET_PeerIdentity pp[putlen + 1];
- if (0 != (options & GNUNET_DHT_RO_RECORD_ROUTE))
- {
- memcpy (pp, put_path, putlen * sizeof (struct GNUNET_PeerIdentity));
- pp[putlen] = my_identity;
- putlen++;
- }
- else
- putlen = 0;
+
GDS_CLIENTS_process_put (options,
ntohl (put->block_type),