+ struct Trail *trail;
+ struct FriendInfo *pred;
+ struct FingerTable *ft;
+ struct Finger *finger;
+
+ trail = GNUNET_CONTAINER_multihashmap_get (trail_map,
+ &rwrm->trail_id);
+ if (NULL == trail)
+ {
+ /* TODO: log/statistics: we didn't find the trail (can happen) */
+ return;
+ }
+ if (NULL != (pred = trail->pred))
+ {
+ /* We are not the first hop, keep forwarding */
+ struct GNUNET_MQ_Envelope *env;
+ struct RandomWalkResponseMessage *rwrm2;
+
+ env = GNUNET_MQ_msg (rwrm2,
+ GNUNET_MESSAGE_TYPE_WDHT_RANDOM_WALK_RESPONSE);
+ rwrm2->reserved = htonl (0);
+ rwrm2->location = rwrm->location;
+ rwrm2->trail_id = trail->pred_id;
+ GNUNET_MQ_send (pred->mq,
+ env);
+ return;
+ }
+ /* We are the first hop, complete finger */
+ if (NULL == (ft = trail->ft))
+ {
+ /* Eh, why did we create the trail if we have no FT? */
+ GNUNET_break (0);
+ delete_trail (trail,
+ GNUNET_NO,
+ GNUNET_YES);
+ return;
+ }
+ if (NULL == (finger = ft->fingers[trail->finger_off]))
+ {
+ /* Eh, finger got deleted, but why not the trail as well? */
+ GNUNET_break (0);
+ delete_trail (trail,
+ GNUNET_NO,
+ GNUNET_YES);
+ return;
+ }
+