This file is part of GNUnet.
Copyright (C) 2009, 2010, 2011, 2012, 2013, 2016 GNUnet e.V.
- GNUnet is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published
- by the Free Software Foundation; either version 3, or (at your
- option) any later version.
+ GNUnet is free software: you can redistribute it and/or modify it
+ under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License,
+ or (at your option) any later version.
GNUnet is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
+ Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
- You should have received a copy of the GNU General Public License
- along with GNUnet; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA.
+ SPDX-License-Identifier: AGPL3.0-or-later
*/
/**
GNUNET_notification_context_add (nc,
mq);
setup_estimate_message (&em);
- env = GNUNET_MQ_msg_copy (&em.header);
+ env = GNUNET_MQ_msg_copy (&em.header);
GNUNET_MQ_send (mq,
env);
GNUNET_SERVICE_client_continue (client);
struct NSEPeerEntry *peer_entry = cls;
unsigned int idx;
struct GNUNET_MQ_Envelope *env;
-
+
peer_entry->transmit_task = NULL;
idx = estimate_index;
if (GNUNET_NO == peer_entry->previous_round)
{
idx = (idx + HISTORY_SIZE - 1) % HISTORY_SIZE;
peer_entry->previous_round = GNUNET_YES;
- peer_entry->transmit_task
+ peer_entry->transmit_task
= GNUNET_SCHEDULER_add_delayed (get_transmit_delay (0),
&transmit_task_cb,
peer_entry);
GNUNET_NO);
#if ENABLE_NSE_HISTOGRAM
peer_entry->transmitted_messages++;
- peer_entry->last_transmitted_size
+ peer_entry->last_transmitted_size
= ntohl(size_estimate_messages[idx].matching_bits);
#endif
env = GNUNET_MQ_msg_copy (&size_estimate_messages[idx].header);
GNUNET_MQ_send (peer_entry->mq,
- env);
+ env);
}
GNUNET_CONTAINER_multipeermap_iterate (peers,
&schedule_current_round,
NULL);
- flood_task =
- GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_absolute_get_remaining
- (next_timestamp),
- &update_flood_message,
- NULL);
+ flood_task
+ = GNUNET_SCHEDULER_add_at (next_timestamp,
+ &update_flood_message,
+ NULL);
}
{
/* still stuck in previous round, no point to update, check that
* we are active here though... */
- if (NULL == peer_entry->transmit_task)
+ if (NULL == peer_entry->transmit_task)
{
GNUNET_break (0);
}
/**
* Core handler for size estimate flooding messages.
*
- * @param cls peer this message is from
+ * @param cls peer this message is from
* @param incoming_flood received message
*/
static void
/* push back our result now, that peer is spreading bad information... */
if (NULL != peer_entry->transmit_task)
GNUNET_SCHEDULER_cancel (peer_entry->transmit_task);
- peer_entry->transmit_task
+ peer_entry->transmit_task
= GNUNET_SCHEDULER_add_now (&transmit_task_cb,
peer_entry);
/* Not closer than our most recent message, no need to do work here */
current_timestamp);
estimate_count++;
}
- flood_task =
- GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_absolute_get_remaining
- (next_timestamp),
- &update_flood_message,
- NULL);
+ flood_task
+ = GNUNET_SCHEDULER_add_at (next_timestamp,
+ &update_flood_message,
+ NULL);
}