projects
/
oweals
/
gnunet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
check against all pending requests with same hash, not just first; this is a true...
[oweals/gnunet.git]
/
src
/
fs
/
fs_namespace.c
diff --git
a/src/fs/fs_namespace.c
b/src/fs/fs_namespace.c
index 526ebbdfc356a8df83b2366218d97d9d17d68c1a..5d52265b74c9c05916bb28053d9f33d9e5de0abf 100644
(file)
--- a/
src/fs/fs_namespace.c
+++ b/
src/fs/fs_namespace.c
@@
-1,6
+1,6
@@
/*
This file is part of GNUnet
/*
This file is part of GNUnet
- (C) 2003-2013 Christian Grothoff (and other contributing authors)
+
Copyright
(C) 2003-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.
*/
/**
*/
/**
@@
-92,7
+92,7
@@
struct GNUNET_FS_UpdateInformationGraph
/**
* Private key for the namespace.
*/
/**
* Private key for the namespace.
*/
- struct GNUNET_CRYPTO_Ec
c
PrivateKey ns;
+ struct GNUNET_CRYPTO_Ec
dsa
PrivateKey ns;
/**
* Hash map mapping identifiers of update nodes
/**
* Hash map mapping identifiers of update nodes
@@
-127,11
+127,11
@@
struct GNUNET_FS_UpdateInformationGraph
*/
static char *
get_update_information_directory (struct GNUNET_FS_Handle *h,
*/
static char *
get_update_information_directory (struct GNUNET_FS_Handle *h,
- const struct GNUNET_CRYPTO_Ec
c
PrivateKey *ns)
+ const struct GNUNET_CRYPTO_Ec
dsa
PrivateKey *ns)
{
char *dn;
char *ret;
{
char *dn;
char *ret;
- struct GNUNET_CRYPTO_Ec
c
PublicKey pub;
+ struct GNUNET_CRYPTO_Ec
dsa
PublicKey pub;
struct GNUNET_HashCode hc;
struct GNUNET_CRYPTO_HashAsciiEncoded enc;
struct GNUNET_HashCode hc;
struct GNUNET_CRYPTO_HashAsciiEncoded enc;
@@
-143,13
+143,13
@@
get_update_information_directory (struct GNUNET_FS_Handle *h,
"fs", "UPDATE_DIR");
return NULL;
}
"fs", "UPDATE_DIR");
return NULL;
}
- GNUNET_CRYPTO_ec
c
_key_get_public (ns, &pub);
+ GNUNET_CRYPTO_ec
dsa
_key_get_public (ns, &pub);
GNUNET_CRYPTO_hash (&pub, sizeof (pub), &hc);
GNUNET_CRYPTO_hash_to_enc (&hc,
&enc);
GNUNET_CRYPTO_hash (&pub, sizeof (pub), &hc);
GNUNET_CRYPTO_hash_to_enc (&hc,
&enc);
- GNUNET_asprintf (&ret, "%s%s%s",
- dn,
- DIR_SEPARATOR_STR,
+ GNUNET_asprintf (&ret, "%s%s%s",
+ dn,
+ DIR_SEPARATOR_STR,
(const char *) enc.encoding);
GNUNET_free (dn);
return ret;
(const char *) enc.encoding);
GNUNET_free (dn);
return ret;
@@
-158,7
+158,7
@@
get_update_information_directory (struct GNUNET_FS_Handle *h,
/**
* Release memory occupied by UIG datastructure.
/**
* Release memory occupied by UIG datastructure.
- *
+ *
* @param uig data structure to free
*/
static void
* @param uig data structure to free
*/
static void
@@
-241,7
+241,7
@@
END:
*/
static struct GNUNET_FS_UpdateInformationGraph *
read_update_information_graph (struct GNUNET_FS_Handle *h,
*/
static struct GNUNET_FS_UpdateInformationGraph *
read_update_information_graph (struct GNUNET_FS_Handle *h,
- const struct GNUNET_CRYPTO_Ec
c
PrivateKey *ns)
+ const struct GNUNET_CRYPTO_Ec
dsa
PrivateKey *ns)
{
struct GNUNET_FS_UpdateInformationGraph *uig;
char *fn;
{
struct GNUNET_FS_UpdateInformationGraph *uig;
char *fn;
@@
-317,7
+317,7
@@
read_update_information_graph (struct GNUNET_FS_Handle *h,
END:
if (GNUNET_OK != GNUNET_BIO_read_close (rh, &emsg))
{
END:
if (GNUNET_OK != GNUNET_BIO_read_close (rh, &emsg))
{
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR, _("Failed to read `%s': %s\n"),
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR, _("Failed to read `%s': %s\n"),
fn, emsg);
GNUNET_free (emsg);
}
fn, emsg);
GNUNET_free (emsg);
}
@@
-346,7
+346,7
@@
struct GNUNET_FS_PublishSksContext
/**
* Namespace we're publishing to.
*/
/**
* Namespace we're publishing to.
*/
- struct GNUNET_CRYPTO_Ec
c
PrivateKey ns;
+ struct GNUNET_CRYPTO_Ec
dsa
PrivateKey ns;
/**
* Handle to the datastore.
/**
* Handle to the datastore.
@@
-383,7
+383,7
@@
struct GNUNET_FS_PublishSksContext
* @param msg error message (or NULL)
*/
static void
* @param msg error message (or NULL)
*/
static void
-sks_publish_cont (void *cls,
+sks_publish_cont (void *cls,
const char *msg)
{
struct GNUNET_FS_PublishSksContext *psc = cls;
const char *msg)
{
struct GNUNET_FS_PublishSksContext *psc = cls;
@@
-405,7
+405,7
@@
sks_publish_cont (void *cls,
uig = read_update_information_graph (psc->h,
&psc->ns);
GNUNET_array_append (uig->update_nodes,
uig = read_update_information_graph (psc->h,
&psc->ns);
GNUNET_array_append (uig->update_nodes,
- uig->update_node_count,
+ uig->update_node_count,
psc->nsn);
psc->nsn = NULL;
write_update_information_graph (uig);
psc->nsn);
psc->nsn = NULL;
write_update_information_graph (uig);
@@
-434,7
+434,7
@@
sks_publish_cont (void *cls,
*/
struct GNUNET_FS_PublishSksContext *
GNUNET_FS_publish_sks (struct GNUNET_FS_Handle *h,
*/
struct GNUNET_FS_PublishSksContext *
GNUNET_FS_publish_sks (struct GNUNET_FS_Handle *h,
- const struct GNUNET_CRYPTO_Ec
c
PrivateKey *ns,
+ const struct GNUNET_CRYPTO_Ec
dsa
PrivateKey *ns,
const char *identifier, const char *update,
const struct GNUNET_CONTAINER_MetaData *meta,
const struct GNUNET_FS_Uri *uri,
const char *identifier, const char *update,
const struct GNUNET_CONTAINER_MetaData *meta,
const struct GNUNET_FS_Uri *uri,
@@
-448,7
+448,7
@@
GNUNET_FS_publish_sks (struct GNUNET_FS_Handle *h,
sks_uri = GNUNET_new (struct GNUNET_FS_Uri);
sks_uri->type = GNUNET_FS_URI_SKS;
sks_uri->data.sks.identifier = GNUNET_strdup (identifier);
sks_uri = GNUNET_new (struct GNUNET_FS_Uri);
sks_uri->type = GNUNET_FS_URI_SKS;
sks_uri->data.sks.identifier = GNUNET_strdup (identifier);
- GNUNET_CRYPTO_ec
c
_key_get_public (ns,
+ GNUNET_CRYPTO_ec
dsa
_key_get_public (ns,
&sks_uri->data.sks.ns);
psc = GNUNET_new (struct GNUNET_FS_PublishSksContext);
&sks_uri->data.sks.ns);
psc = GNUNET_new (struct GNUNET_FS_PublishSksContext);
@@
-549,16
+549,16
@@
struct ProcessUpdateClosure
* GNUNET_NO if not.
*/
static int
* GNUNET_NO if not.
*/
static int
-process_update_node (void *cls,
- const struct GNUNET_HashCode *key,
+process_update_node (void *cls,
+ const struct GNUNET_HashCode *key,
void *value)
{
struct ProcessUpdateClosure *pc = cls;
struct NamespaceUpdateNode *nsn = value;
pc->ip (pc->ip_cls,
void *value)
{
struct ProcessUpdateClosure *pc = cls;
struct NamespaceUpdateNode *nsn = value;
pc->ip (pc->ip_cls,
- nsn->id,
- nsn->uri,
+ nsn->id,
+ nsn->uri,
nsn->md,
nsn->update);
return GNUNET_YES;
nsn->md,
nsn->update);
return GNUNET_YES;
@@
-619,7
+619,7
@@
struct FindTreeClosure
*/
static int
find_trees (void *cls,
*/
static int
find_trees (void *cls,
- const struct GNUNET_HashCode *key,
+ const struct GNUNET_HashCode *key,
void *value)
{
struct FindTreeClosure *fc = cls;
void *value)
{
struct FindTreeClosure *fc = cls;
@@
-679,7
+679,7
@@
find_trees (void *cls,
*/
void
GNUNET_FS_namespace_list_updateable (struct GNUNET_FS_Handle *h,
*/
void
GNUNET_FS_namespace_list_updateable (struct GNUNET_FS_Handle *h,
- const struct GNUNET_CRYPTO_Ec
c
PrivateKey *ns,
+ const struct GNUNET_CRYPTO_Ec
dsa
PrivateKey *ns,
const char *next_id,
GNUNET_FS_IdentifierProcessor ip,
void *ip_cls)
const char *next_id,
GNUNET_FS_IdentifierProcessor ip,
void *ip_cls)
@@
-780,7
+780,7
@@
GNUNET_FS_namespace_list_updateable (struct GNUNET_FS_Handle *h,
fc.tree_array[fc.id] = nsn;
nsn->tree_id = fc.id;
}
fc.tree_array[fc.id] = nsn;
nsn->tree_id = fc.id;
}
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"TREE of node `%s' is %u\n", nsn->id,
fc.id);
}
"TREE of node `%s' is %u\n", nsn->id,
fc.id);
}