projects
/
oweals
/
gnunet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
- compiler warning
[oweals/gnunet.git]
/
src
/
namecache
/
namecache_api.c
diff --git
a/src/namecache/namecache_api.c
b/src/namecache/namecache_api.c
index a28ed7d539fe6b99a1d7d86a1cf4cf0aa2a471c4..288d53b19d4d563f5df6152ac2b6ba9c3db47e2b 100644
(file)
--- a/
src/namecache/namecache_api.c
+++ b/
src/namecache/namecache_api.c
@@
-1,6
+1,6
@@
/*
This file is part of GNUnet.
/*
This file is part of GNUnet.
- (C) 2010-2013 Christian Grothoff (and other contributing authors)
+
Copyright
(C) 2010-2013 Christian Grothoff (and other contributing authors)
GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
@@
-14,8
+14,8
@@
You should have received a copy of the GNU General Public License
along with GNUnet; see the file COPYING. If not, write to the
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., 5
9 Temple Place - Suite 330
,
- Boston, MA 0211
1-1307
, USA.
+ Free Software Foundation, Inc., 5
1 Franklin Street, Fifth Floor
,
+ Boston, MA 0211
0-1301
, USA.
*/
/**
*/
/**
@@
-31,10
+31,9
@@
#include "gnunet_crypto_lib.h"
#include "gnunet_constants.h"
#include "gnunet_dnsparser_lib.h"
#include "gnunet_crypto_lib.h"
#include "gnunet_constants.h"
#include "gnunet_dnsparser_lib.h"
-#include "gnunet_
arm_service
.h"
+#include "gnunet_
gnsrecord_lib
.h"
#include "gnunet_signatures.h"
#include "gnunet_namecache_service.h"
#include "gnunet_signatures.h"
#include "gnunet_namecache_service.h"
-#include "gnunet_namestore_service.h"
#include "namecache.h"
#include "namecache.h"
@@
-76,7
+75,7
@@
struct GNUNET_NAMECACHE_QueueEntry
/**
* Function to call with the blocks we get back; or NULL.
*/
/**
* Function to call with the blocks we get back; or NULL.
*/
- GNUNET_NAME
STOR
E_BlockProcessor block_proc;
+ GNUNET_NAME
CACH
E_BlockProcessor block_proc;
/**
* Closure for @e block_proc.
/**
* Closure for @e block_proc.
@@
-160,7
+159,7
@@
struct GNUNET_NAMECACHE_Handle
/**
* Reconnect task
*/
/**
* Reconnect task
*/
-
GNUNET_SCHEDULER_TaskIdentifier
reconnect_task;
+
struct GNUNET_SCHEDULER_Task *
reconnect_task;
/**
* Delay introduced before we reconnect.
/**
* Delay introduced before we reconnect.
@@
-208,8
+207,8
@@
handle_lookup_block_response (struct GNUNET_NAMECACHE_QueueEntry *qe,
const struct LookupBlockResponseMessage *msg,
size_t size)
{
const struct LookupBlockResponseMessage *msg,
size_t size)
{
- struct GNUNET_
NAMESTORE
_Block *block;
- char buf[size + sizeof (struct GNUNET_
NAMESTORE
_Block)
+ struct GNUNET_
GNSRECORD
_Block *block;
+ char buf[size + sizeof (struct GNUNET_
GNSRECORD
_Block)
- sizeof (struct LookupBlockResponseMessage)];
LOG (GNUNET_ERROR_TYPE_DEBUG,
- sizeof (struct LookupBlockResponseMessage)];
LOG (GNUNET_ERROR_TYPE_DEBUG,
@@
-223,7
+222,7
@@
handle_lookup_block_response (struct GNUNET_NAMECACHE_QueueEntry *qe,
return GNUNET_OK;
}
return GNUNET_OK;
}
- block = (struct GNUNET_
NAMESTORE
_Block *) buf;
+ block = (struct GNUNET_
GNSRECORD
_Block *) buf;
block->signature = msg->signature;
block->derived_key = msg->derived_key;
block->purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_GNS_RECORD_SIGN);
block->signature = msg->signature;
block->derived_key = msg->derived_key;
block->purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_GNS_RECORD_SIGN);
@@
-235,7
+234,7
@@
handle_lookup_block_response (struct GNUNET_NAMECACHE_QueueEntry *qe,
&msg[1],
size - sizeof (struct LookupBlockResponseMessage));
if (GNUNET_OK !=
&msg[1],
size - sizeof (struct LookupBlockResponseMessage));
if (GNUNET_OK !=
- GNUNET_
NAMESTORE
_block_verify (block))
+ GNUNET_
GNSRECORD
_block_verify (block))
{
GNUNET_break (0);
return GNUNET_SYSERR;
{
GNUNET_break (0);
return GNUNET_SYSERR;
@@
-272,8
+271,8
@@
handle_block_cache_response (struct GNUNET_NAMECACHE_QueueEntry *qe,
if (NULL != qe->cont)
qe->cont (qe->cont_cls,
res,
if (NULL != qe->cont)
qe->cont (qe->cont_cls,
res,
- (GNUNET_OK == res)
?
- NULL
+ (GNUNET_OK == res)
+
?
NULL
: _("Namecache failed to cache block"));
return GNUNET_OK;
}
: _("Namecache failed to cache block"));
return GNUNET_OK;
}
@@
-504,7
+503,7
@@
reconnect_task (void *cls,
{
struct GNUNET_NAMECACHE_Handle *h = cls;
{
struct GNUNET_NAMECACHE_Handle *h = cls;
- h->reconnect_task =
GNUNET_SCHEDULER_NO_TASK
;
+ h->reconnect_task =
NULL
;
reconnect (h);
}
reconnect (h);
}
@@
-602,10
+601,10
@@
GNUNET_NAMECACHE_disconnect (struct GNUNET_NAMECACHE_Handle *h)
GNUNET_CLIENT_disconnect (h->client);
h->client = NULL;
}
GNUNET_CLIENT_disconnect (h->client);
h->client = NULL;
}
- if (
GNUNET_SCHEDULER_NO_TASK
!= h->reconnect_task)
+ if (
NULL
!= h->reconnect_task)
{
GNUNET_SCHEDULER_cancel (h->reconnect_task);
{
GNUNET_SCHEDULER_cancel (h->reconnect_task);
- h->reconnect_task =
GNUNET_SCHEDULER_NO_TASK
;
+ h->reconnect_task =
NULL
;
}
GNUNET_free (h);
}
}
GNUNET_free (h);
}
@@
-623,7
+622,7
@@
GNUNET_NAMECACHE_disconnect (struct GNUNET_NAMECACHE_Handle *h)
*/
struct GNUNET_NAMECACHE_QueueEntry *
GNUNET_NAMECACHE_block_cache (struct GNUNET_NAMECACHE_Handle *h,
*/
struct GNUNET_NAMECACHE_QueueEntry *
GNUNET_NAMECACHE_block_cache (struct GNUNET_NAMECACHE_Handle *h,
- const struct GNUNET_
NAMESTORE
_Block *block,
+ const struct GNUNET_
GNSRECORD
_Block *block,
GNUNET_NAMECACHE_ContinuationWithStatus cont,
void *cont_cls)
{
GNUNET_NAMECACHE_ContinuationWithStatus cont,
void *cont_cls)
{
@@
-683,7
+682,7
@@
GNUNET_NAMECACHE_block_cache (struct GNUNET_NAMECACHE_Handle *h,
struct GNUNET_NAMECACHE_QueueEntry *
GNUNET_NAMECACHE_lookup_block (struct GNUNET_NAMECACHE_Handle *h,
const struct GNUNET_HashCode *derived_hash,
struct GNUNET_NAMECACHE_QueueEntry *
GNUNET_NAMECACHE_lookup_block (struct GNUNET_NAMECACHE_Handle *h,
const struct GNUNET_HashCode *derived_hash,
- GNUNET_NAME
STOR
E_BlockProcessor proc, void *proc_cls)
+ GNUNET_NAME
CACH
E_BlockProcessor proc, void *proc_cls)
{
struct GNUNET_NAMECACHE_QueueEntry *qe;
struct PendingMessage *pe;
{
struct GNUNET_NAMECACHE_QueueEntry *qe;
struct PendingMessage *pe;
@@
-691,8
+690,6
@@
GNUNET_NAMECACHE_lookup_block (struct GNUNET_NAMECACHE_Handle *h,
size_t msg_size;
uint32_t rid;
size_t msg_size;
uint32_t rid;
- GNUNET_assert (NULL != h);
- GNUNET_assert (NULL != derived_hash);
LOG (GNUNET_ERROR_TYPE_DEBUG,
"Looking for block under %s\n",
GNUNET_h2s (derived_hash));
LOG (GNUNET_ERROR_TYPE_DEBUG,
"Looking for block under %s\n",
GNUNET_h2s (derived_hash));