pr = GSF_handle_p2p_query_ (other, message);
if (NULL == pr)
return GNUNET_SYSERR;
+ GSF_pending_request_get_data_ (pr)->has_started = GNUNET_YES;
GSF_local_lookup_ (pr, &consider_forwarding, NULL);
update_latencies (atsi, atsi_count);
return GNUNET_OK;
GNUNET_SERVER_receive_done (client, GNUNET_OK);
break;
case GNUNET_YES:
+ GSF_pending_request_get_data_ (pr)->has_started = GNUNET_YES;
GSF_local_lookup_ (pr, &start_p2p_processing, client);
break;
default:
if ((type == GNUNET_BLOCK_TYPE_FS_KBLOCK) ||
(type == GNUNET_BLOCK_TYPE_FS_NBLOCK) || (type == GNUNET_BLOCK_TYPE_ANY))
{
- /* FIXME: this does currently not work to filter duplicate
- * results from *local* datastore since the local store is
- * queried before we continue to process additional
- * messages from the client! -- fix protocol? */
cr = lc->cr_head;
while (cr != NULL)
{
prd = GSF_pending_request_get_data_ (cr->pr);
- if ((0 != memcmp (&prd->query, &sm->query, sizeof (GNUNET_HashCode))) &&
+ /* only unify with queries that hae not yet started local processing
+ (SEARCH_MESSAGE_OPTION_CONTINUED was always set) and that have a
+ matching query and type */
+ if ((GNUNET_YES != prd->has_started) &&
+ (0 != memcmp (&prd->query, &sm->query, sizeof (GNUNET_HashCode))) &&
(prd->type == type))
break;
cr = cr->next;