This file is part of GNUnet.
Copyright (C) 2014, 2015, 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.
-
- 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.
+ 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/>.
*/
/**
GNUNET_MQ_send (GNUNET_SERVICE_client_get_mq (cls_record->client),
env);
if (NULL == emsg)
+ {
GNUNET_SERVICE_client_continue (cls_record->client);
+ }
else
+ {
+ GNUNET_break (0);
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Failed to iterate: %s\n",
+ emsg);
GNUNET_SERVICE_client_drop (cls_record->client);
+ }
PEERSTORE_destroy_record (cls_record);
return;
}
env = PEERSTORE_create_record_mq_envelope (record->sub_system,
- record->peer,
+ &record->peer,
record->key,
record->value,
record->value_size,
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Found a watcher to update.\n");
env = PEERSTORE_create_record_mq_envelope (record->sub_system,
- record->peer,
+ &record->peer,
record->key,
record->value,
record->value_size,
struct GNUNET_HashCode keyhash;
PEERSTORE_hash_key (record->sub_system,
- record->peer,
+ &record->peer,
record->key,
&keyhash);
GNUNET_CONTAINER_multihashmap_get_multiple (watchers,
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Iterate request: ss `%s', peer `%s', key `%s'\n",
record->sub_system,
- (NULL == record->peer) ? "NULL" : GNUNET_i2s (record->peer),
+ GNUNET_i2s (&record->peer),
(NULL == record->key) ? "NULL" : record->key);
record->client = client;
if (GNUNET_OK !=
db->iterate_records (db->cls,
record->sub_system,
- record->peer,
+ (ntohs (srm->peer_set)) ? &record->peer : NULL,
record->key,
&record_iterator,
record))
{
+ GNUNET_break (0);
GNUNET_SERVICE_client_drop (client);
PEERSTORE_destroy_record (record);
}
}
else
{
+ GNUNET_break (0);
GNUNET_SERVICE_client_drop (record->client);
}
PEERSTORE_destroy_record (record);
return GNUNET_SYSERR;
}
if ( (NULL == record->sub_system) ||
- (NULL == record->peer) ||
(NULL == record->key) )
{
GNUNET_break (0);
record = PEERSTORE_parse_record_message (srm);
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "Received a store request. Sub system `%s' Peer `%s Key `%s' Options: %d.\n",
+ "Received a store request. Sub system `%s' Peer `%s Key `%s' Options: %u.\n",
record->sub_system,
- GNUNET_i2s (record->peer),
+ GNUNET_i2s (&record->peer),
record->key,
- ntohl (srm->options));
+ (uint32_t) ntohl (srm->options));
record->client = client;
if (GNUNET_OK !=
db->store_record (db->cls,
record->sub_system,
- record->peer,
+ &record->peer,
record->key,
record->value,
record->value_size,
- *record->expiry,
+ record->expiry,
ntohl (srm->options),
&store_record_continuation,
record))
{
+ GNUNET_break (0);
PEERSTORE_destroy_record (record);
GNUNET_SERVICE_client_drop (client);
return;