This file is part of GNUnet.
Copyright (C) 2009-2014, 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 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.
+ 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/>.
+
+ SPDX-License-Identifier: AGPL3.0-or-later
*/
/**
#include "gnunet_util_lib.h"
#include "gnunet-service-fs_cp.h"
#include "gnunet-service-fs_indexing.h"
-#include "gnunet-service-fs_lc.h"
#include "gnunet-service-fs_pe.h"
#include "gnunet-service-fs_pr.h"
#include "gnunet-service-fs_push.h"
check_client_index_start (void *cls,
const struct IndexStartMessage *ism)
{
- uint16_t msize;
char *fn;
- msize = ntohs (ism->header.size);
- if (((const char *) ism)[msize - 1] != '\0')
- {
- GNUNET_break (0);
- return GNUNET_SYSERR;
- }
+ GNUNET_MQ_check_zero_termination (ism);
if (0 != ism->reserved)
{
GNUNET_break (0);
static void
shutdown_task (void *cls)
{
- GSF_cadet_stop_client ();
GSF_cadet_stop_server ();
if (NULL != GSF_core)
{
- GNUNET_CORE_disconnecT (GSF_core);
+ GNUNET_CORE_disconnect (GSF_core);
GSF_core = NULL;
}
if (NULL != GSF_ats)
/**
- * Function called after GNUNET_CORE_connecT has succeeded
+ * Function called after GNUNET_CORE_connect has succeeded
* (or failed for good). Note that the private key of the
* peer is intentionally not exposed here; if you need it,
* your process should try to read the private key file
peer_init_handler (void *cls,
const struct GNUNET_PeerIdentity *my_identity)
{
- if (0 != GNUNET_CRYPTO_cmp_peer_identity (&GSF_my_id,
+ if (0 != GNUNET_memcmp (&GSF_my_id,
my_identity))
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
- "Peer identity missmatch, refusing to start!\n");
+ "Peer identity mismatch, refusing to start!\n");
GNUNET_SCHEDULER_shutdown ();
}
}
"I am peer %s\n",
GNUNET_i2s (&GSF_my_id));
GSF_core
- = GNUNET_CORE_connecT (GSF_cfg,
+ = GNUNET_CORE_connect (GSF_cfg,
NULL,
&peer_init_handler,
&GSF_peer_connect_handler,
NULL);
datastore_get_load = GNUNET_LOAD_value_init (DATASTORE_LOAD_AUTODECLINE);
GSF_cadet_start_server ();
- GSF_cadet_start_client ();
GNUNET_SCHEDULER_add_shutdown (&shutdown_task,
NULL);
return GNUNET_OK;
GNUNET_log_config_missing (GNUNET_ERROR_TYPE_INFO,
"fs",
"DATASTORE_QUEUE_SIZE");
- dqs = 1024;
+ dqs = 32;
}
GSF_datastore_queue_size = (unsigned int) dqs;
GSF_enable_randomized_delays =