{
if (ntohl (atsi[i].type) == GNUNET_ATS_QUALITY_NET_DELAY)
{
- GSF_avg_latency.rel_value = (GSF_avg_latency.rel_value * 31 +
- GNUNET_MIN (5000,
- ntohl (atsi[i].value))) / 32;
+ GSF_avg_latency.rel_value =
+ (GSF_avg_latency.rel_value * 31 +
+ GNUNET_MIN (5000, ntohl (atsi[i].value))) / 32;
GNUNET_STATISTICS_set (GSF_stats,
gettext_noop
("# running average P2P latency (ms)"),
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;
struct GSF_PendingRequestData *prd;
prd = GSF_pending_request_get_data_ (pr);
-#if DEBUG_FS_CLIENT
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Finished database lookup for local request `%s' with result %d\n",
GNUNET_h2s (&prd->query), result);
-#endif
GNUNET_SERVER_receive_done (client, GNUNET_OK);
if (GNUNET_BLOCK_EVALUATION_OK_LAST == result)
return; /* we're done, 'pr' was already destroyed... */
int ret;
pr = NULL;
- ret = GSF_local_client_start_search_handler_ (client, message,
- &pr);
+ ret = GSF_local_client_start_search_handler_ (client, message, &pr);
switch (ret)
{
case GNUNET_SYSERR:
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:
{NULL, NULL, 0, 0}
};
- GSF_core = GNUNET_CORE_connect (GSF_cfg, 2, /* larger? */
- NULL, &peer_init_handler,
- &peer_connect_handler,
- &GSF_peer_disconnect_handler_, NULL,
- GNUNET_NO, NULL, GNUNET_NO, p2p_handlers);
+ GSF_core =
+ GNUNET_CORE_connect (GSF_cfg, 1, NULL, &peer_init_handler,
+ &peer_connect_handler, &GSF_peer_disconnect_handler_,
+ NULL, GNUNET_NO, NULL, GNUNET_NO, p2p_handlers);
if (NULL == GSF_core)
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,