This file is part of GNUnet
Copyright (C) 2013-2017 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.
*/
/**
* @file set/gnunet-service-set_union.c
struct GNUNET_MQ_Envelope *ev;
struct GNUNET_SET_ResultMessage *msg;
- LOG (GNUNET_ERROR_TYPE_ERROR,
+ LOG (GNUNET_ERROR_TYPE_WARNING,
"union operation failed\n");
ev = GNUNET_MQ_msg (msg, GNUNET_MESSAGE_TYPE_SET_RESULT);
msg->result_status = htons (GNUNET_SET_STATUS_FAILURE);
struct IBF_Key key;
uint16_t salt = 0;
- GNUNET_CRYPTO_kdf (&key, sizeof (key),
- src, sizeof *src,
- &salt, sizeof (salt),
- NULL, 0);
+ GNUNET_assert (GNUNET_OK ==
+ GNUNET_CRYPTO_kdf (&key, sizeof (key),
+ src, sizeof *src,
+ &salt, sizeof (salt),
+ NULL, 0));
return key;
}
unsigned int ibf_order;
ibf_order = 2;
- while ( (1<<ibf_order) < (IBF_ALPHA * diff) ||
- ((1<<ibf_order) < SE_IBF_HASH_NUM) )
+ while ( ( (1<<ibf_order) < (IBF_ALPHA * diff) ||
+ ((1<<ibf_order) < SE_IBF_HASH_NUM) ) &&
+ (ibf_order < MAX_IBF_ORDER) )
ibf_order++;
- if (ibf_order > MAX_IBF_ORDER)
- ibf_order = MAX_IBF_ORDER;
// add one for correction
return ibf_order + 1;
}
}
if (PHASE_DONE != op->state->phase) {
- LOG (GNUNET_ERROR_TYPE_ERROR,
+ LOG (GNUNET_ERROR_TYPE_WARNING,
"union operation failed\n");
ev = GNUNET_MQ_msg (rm, GNUNET_MESSAGE_TYPE_SET_RESULT);
rm->result_status = htons (GNUNET_SET_STATUS_FAILURE);
num_demanded);
if (0 == num_demanded)
{
- struct GNUNET_MQ_Envelope *ev;
-
op->state->phase = PHASE_DONE;
send_client_done (op);
destroy_channel (op);
break;
case PHASE_FULL_SENDING:
{
- struct GNUNET_MQ_Envelope *ev;
-
LOG (GNUNET_ERROR_TYPE_DEBUG,
"got FULL DONE, finishing\n");
/* We sent the full set, and got the response for that. We're done. */