gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r23744 - in gnunet/src: fs include


From: gnunet
Subject: [GNUnet-SVN] r23744 - in gnunet/src: fs include
Date: Tue, 11 Sep 2012 00:17:19 +0200

Author: grothoff
Date: 2012-09-11 00:17:19 +0200 (Tue, 11 Sep 2012)
New Revision: 23744

Modified:
   gnunet/src/fs/fs_api.c
   gnunet/src/fs/fs_api.h
   gnunet/src/fs/fs_namespace.c
   gnunet/src/fs/fs_publish.c
   gnunet/src/fs/fs_search.c
   gnunet/src/fs/fs_uri.c
   gnunet/src/include/gnunet_fs_service.h
Log:
eliminating use of 'namespace' as a fieldname / variable name to be C++ 
compatible

Modified: gnunet/src/fs/fs_api.c
===================================================================
--- gnunet/src/fs/fs_api.c      2012-09-10 20:33:02 UTC (rev 23743)
+++ gnunet/src/fs/fs_api.c      2012-09-10 22:17:19 UTC (rev 23744)
@@ -1538,8 +1538,8 @@
   }
   if (NULL != ns)
   {
-    pc->namespace = GNUNET_FS_namespace_create (h, ns);
-    if (NULL == pc->namespace)
+    pc->ns = GNUNET_FS_namespace_create (h, ns);
+    if (NULL == pc->ns)
     {
       GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
                   _
@@ -1658,7 +1658,7 @@
                                 (NULL == pc->fi_pos) ? NULL : 
pc->fi_pos->serialization)) ||
       (GNUNET_OK !=
        GNUNET_BIO_write_string (wh,
-                                (NULL == pc->namespace) ? NULL : 
pc->namespace->name)))
+                                (NULL == pc->ns) ? NULL : pc->ns->name)))
   {
     GNUNET_break (0);
     goto cleanup;

Modified: gnunet/src/fs/fs_api.h
===================================================================
--- gnunet/src/fs/fs_api.h      2012-09-10 20:33:02 UTC (rev 23743)
+++ gnunet/src/fs/fs_api.h      2012-09-10 22:17:19 UTC (rev 23744)
@@ -205,7 +205,7 @@
       /**
        * Hash of the public key for the namespace.
        */
-      struct GNUNET_HashCode namespace;
+      struct GNUNET_HashCode ns;
 
       /**
        * Human-readable identifier chosen for this
@@ -1159,7 +1159,7 @@
   /**
    * Namespace that we are publishing in, NULL if we have no namespace.
    */
-  struct GNUNET_FS_Namespace *namespace;
+  struct GNUNET_FS_Namespace *ns;
 
   /**
    * ID of the content in the namespace, NULL if we have no namespace.

Modified: gnunet/src/fs/fs_namespace.c
===================================================================
--- gnunet/src/fs/fs_namespace.c        2012-09-10 20:33:02 UTC (rev 23743)
+++ gnunet/src/fs/fs_namespace.c        2012-09-10 22:17:19 UTC (rev 23744)
@@ -282,44 +282,44 @@
  * memory) or also to freeze the namespace to prevent further
  * insertions by anyone.
  *
- * @param namespace handle to the namespace that should be deleted / freed
+ * @param ns handle to the namespace that should be deleted / freed
  * @param freeze prevents future insertions; creating a namespace
  *        with the same name again will create a fresh namespace instead
  *
  * @return GNUNET_OK on success, GNUNET_SYSERR on error
  */
 int
-GNUNET_FS_namespace_delete (struct GNUNET_FS_Namespace *namespace, int freeze)
+GNUNET_FS_namespace_delete (struct GNUNET_FS_Namespace *ns, int freeze)
 {
   unsigned int i;
   struct NamespaceUpdateNode *nsn;
 
-  namespace->rc--;
+  ns->rc--;
   if (freeze)
   {
-    if (0 != UNLINK (namespace->filename))
+    if (0 != UNLINK (ns->filename))
       GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR, "unlink",
-                                namespace->filename);
+                                ns->filename);
   }
-  if (0 != namespace->rc)
+  if (0 != ns->rc)
     return GNUNET_OK;
-  GNUNET_CRYPTO_rsa_key_free (namespace->key);
-  GNUNET_free (namespace->filename);
-  GNUNET_free (namespace->name);
-  for (i = 0; i < namespace->update_node_count; i++)
+  GNUNET_CRYPTO_rsa_key_free (ns->key);
+  GNUNET_free (ns->filename);
+  GNUNET_free (ns->name);
+  for (i = 0; i < ns->update_node_count; i++)
   {
-    nsn = namespace->update_nodes[i];
+    nsn = ns->update_nodes[i];
     GNUNET_CONTAINER_meta_data_destroy (nsn->md);
     GNUNET_FS_uri_destroy (nsn->uri);
     GNUNET_free (nsn->id);
     GNUNET_free (nsn->update);
     GNUNET_free (nsn);
   }
-  GNUNET_array_grow (namespace->update_nodes, namespace->update_node_count,
+  GNUNET_array_grow (ns->update_nodes, ns->update_node_count,
                     0);
-  if (namespace->update_map != NULL)
-    GNUNET_CONTAINER_multihashmap_destroy (namespace->update_map);
-  GNUNET_free (namespace);
+  if (ns->update_map != NULL)
+    GNUNET_CONTAINER_multihashmap_destroy (ns->update_map);
+  GNUNET_free (ns);
   return GNUNET_OK;
 }
 
@@ -429,7 +429,7 @@
   /**
    * Namespace we're publishing to.
    */
-  struct GNUNET_FS_Namespace *namespace;
+  struct GNUNET_FS_Namespace *ns;
 
   /**
    * Handle to the datastore.
@@ -483,19 +483,19 @@
     /* FIXME: this can be done much more
      * efficiently by simply appending to the
      * file and overwriting the 4-byte header */
-    if (psc->namespace->update_nodes == NULL)
-      read_update_information_graph (psc->namespace);
-    GNUNET_array_append (psc->namespace->update_nodes,
-                        psc->namespace->update_node_count, psc->nsn);
-    if (psc->namespace->update_map != NULL)
+    if (psc->ns->update_nodes == NULL)
+      read_update_information_graph (psc->ns);
+    GNUNET_array_append (psc->ns->update_nodes,
+                        psc->ns->update_node_count, psc->nsn);
+    if (psc->ns->update_map != NULL)
     {
       GNUNET_CRYPTO_hash (psc->nsn->id, strlen (psc->nsn->id), &hc);
-      GNUNET_CONTAINER_multihashmap_put (psc->namespace->update_map, &hc,
+      GNUNET_CONTAINER_multihashmap_put (psc->ns->update_map, &hc,
                                         psc->nsn,
                                         
GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE);
     }
     psc->nsn = NULL;
-    write_update_information_graph (psc->namespace);
+    write_update_information_graph (psc->ns);
   }
   if (NULL != psc->cont)
     psc->cont (psc->cont_cls, psc->uri, NULL);
@@ -507,7 +507,7 @@
  * Publish an SBlock on GNUnet.
  *
  * @param h handle to the file sharing subsystem
- * @param namespace namespace to publish in
+ * @param ns namespace to publish in
  * @param identifier identifier to use
  * @param update update identifier to use
  * @param meta metadata to use
@@ -520,7 +520,7 @@
  */
 struct GNUNET_FS_PublishSksContext *
 GNUNET_FS_publish_sks (struct GNUNET_FS_Handle *h,
-                       struct GNUNET_FS_Namespace *namespace,
+                       struct GNUNET_FS_Namespace *ns,
                        const char *identifier, const char *update,
                        const struct GNUNET_CONTAINER_MetaData *meta,
                        const struct GNUNET_FS_Uri *uri,
@@ -592,12 +592,12 @@
   GNUNET_CRYPTO_hash (&key, sizeof (struct GNUNET_HashCode), &id);
   sks_uri = GNUNET_malloc (sizeof (struct GNUNET_FS_Uri));
   sks_uri->type = sks;
-  GNUNET_CRYPTO_rsa_key_get_public (namespace->key, &sb_enc->subspace);
+  GNUNET_CRYPTO_rsa_key_get_public (ns->key, &sb_enc->subspace);
   GNUNET_CRYPTO_hash (&sb_enc->subspace,
                       sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded),
-                      &sks_uri->data.sks.namespace);
+                      &sks_uri->data.sks.ns);
   sks_uri->data.sks.identifier = GNUNET_strdup (identifier);
-  GNUNET_CRYPTO_hash_xor (&id, &sks_uri->data.sks.namespace,
+  GNUNET_CRYPTO_hash_xor (&id, &sks_uri->data.sks.ns,
                           &sb_enc->identifier);
   GNUNET_CRYPTO_hash_to_aes_key (&key, &sk, &iv);
   GNUNET_CRYPTO_aes_encrypt (&sb[1], size - sizeof (struct SBlock), &sk, &iv,
@@ -607,12 +607,12 @@
       htonl (slen + mdsize + nidlen + sizeof (struct SBlock) -
              sizeof (struct GNUNET_CRYPTO_RsaSignature));
   GNUNET_assert (GNUNET_OK ==
-                 GNUNET_CRYPTO_rsa_sign (namespace->key, &sb_enc->purpose,
+                 GNUNET_CRYPTO_rsa_sign (ns->key, &sb_enc->purpose,
                                          &sb_enc->signature));
   psc = GNUNET_malloc (sizeof (struct GNUNET_FS_PublishSksContext));
   psc->uri = sks_uri;
   psc->cont = cont;
-  psc->namespace = GNUNET_FS_namespace_dup (namespace);
+  psc->ns = GNUNET_FS_namespace_dup (ns);
   psc->cont_cls = cont_cls;
   if (0 != (options & GNUNET_FS_PUBLISH_OPTION_SIMULATE_ONLY))
   {
@@ -629,7 +629,7 @@
     sb_put_cont (psc, GNUNET_NO, GNUNET_TIME_UNIT_ZERO_ABS, _("Failed to 
connect to datastore."));
     return NULL;
   }
-  GNUNET_CRYPTO_hash_xor (&sks_uri->data.sks.namespace, &id, &query);
+  GNUNET_CRYPTO_hash_xor (&sks_uri->data.sks.ns, &id, &query);
   if (NULL != update)
   {
     psc->nsn = GNUNET_malloc (sizeof (struct NamespaceUpdateNode));
@@ -667,7 +667,7 @@
     GNUNET_DATASTORE_disconnect (psc->dsh, GNUNET_NO);
     psc->dsh = NULL;
   }
-  GNUNET_FS_namespace_delete (psc->namespace, GNUNET_NO);
+  GNUNET_FS_namespace_delete (psc->ns, GNUNET_NO);
   GNUNET_FS_uri_destroy (psc->uri);
   if (NULL != psc->nsn)
   {
@@ -727,7 +727,7 @@
   /**
    * Namespace we are operating on.
    */
-  struct GNUNET_FS_Namespace *namespace;
+  struct GNUNET_FS_Namespace *ns;
 
   /**
    * Array with 'head's of TREEs.
@@ -799,7 +799,7 @@
     nsn->tree_id = UINT_MAX;    /* mark as undef */
     /* trace */
     GNUNET_CRYPTO_hash (nsn->update, strlen (nsn->update), &hc);
-    GNUNET_CONTAINER_multihashmap_get_multiple (fc->namespace->update_map, &hc,
+    GNUNET_CONTAINER_multihashmap_get_multiple (fc->ns->update_map, &hc,
                                                 &find_trees, fc);
   }
   return GNUNET_YES;
@@ -823,13 +823,13 @@
  * I know, odd definition of a tree, but the GUI will display an actual
  * tree (GtkTreeView), so that's what counts for the term here.
  *
- * @param namespace namespace to inspect for updateable content
+ * @param ns namespace to inspect for updateable content
  * @param next_id ID to look for; use NULL to look for tree roots
  * @param ip function to call on each updateable identifier
  * @param ip_cls closure for ip
  */
 void
-GNUNET_FS_namespace_list_updateable (struct GNUNET_FS_Namespace *namespace,
+GNUNET_FS_namespace_list_updateable (struct GNUNET_FS_Namespace *ns,
                                      const char *next_id,
                                      GNUNET_FS_IdentifierProcessor ip,
                                      void *ip_cls)
@@ -841,26 +841,26 @@
   struct ProcessUpdateClosure pc;
   struct FindTreeClosure fc;
 
-  if (NULL == namespace->update_nodes)
-    read_update_information_graph (namespace);
-  if (NULL == namespace->update_nodes)
+  if (NULL == ns->update_nodes)
+    read_update_information_graph (ns);
+  if (NULL == ns->update_nodes)
   {
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                 "No updateable nodes found for ID `%s'\n", next_id);
     return;                     /* no nodes */
   }
-  if (NULL == namespace->update_map)
+  if (NULL == ns->update_map)
   {
     /* need to construct */
-    namespace->update_map =
+    ns->update_map =
         GNUNET_CONTAINER_multihashmap_create (2 +
-                                              3 * namespace->update_node_count 
/
+                                              3 * ns->update_node_count /
                                               4);
-    for (i = 0; i < namespace->update_node_count; i++)
+    for (i = 0; i < ns->update_node_count; i++)
     {
-      nsn = namespace->update_nodes[i];
+      nsn = ns->update_nodes[i];
       GNUNET_CRYPTO_hash (nsn->id, strlen (nsn->id), &hc);
-      GNUNET_CONTAINER_multihashmap_put (namespace->update_map, &hc, nsn,
+      GNUNET_CONTAINER_multihashmap_put (ns->update_map, &hc, nsn,
                                          
GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE);
     }
   }
@@ -869,20 +869,20 @@
     GNUNET_CRYPTO_hash (next_id, strlen (next_id), &hc);
     pc.ip = ip;
     pc.ip_cls = ip_cls;
-    GNUNET_CONTAINER_multihashmap_get_multiple (namespace->update_map, &hc,
+    GNUNET_CONTAINER_multihashmap_get_multiple (ns->update_map, &hc,
                                                 &process_update_node, &pc);
     return;
   }
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Calculating TREEs to find roots of update trees\n");
   /* Find heads of TREEs in update graph */
-  nug = ++namespace->nug_gen;
+  nug = ++ns->nug_gen;
   fc.tree_array = NULL;
   fc.tree_array_size = 0;
 
-  for (i = 0; i < namespace->update_node_count; i++)
+  for (i = 0; i < ns->update_node_count; i++)
   {
-    nsn = namespace->update_nodes[i];
+    nsn = ns->update_nodes[i];
     if (nsn->nug == nug)
     {
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "TREE of node `%s' is %u\n", 
nsn->id,
@@ -894,8 +894,8 @@
     nsn->tree_id = UINT_MAX;
     fc.id = UINT_MAX;
     fc.nug = nug;
-    fc.namespace = namespace;
-    GNUNET_CONTAINER_multihashmap_get_multiple (namespace->update_map, &hc,
+    fc.ns = ns;
+    GNUNET_CONTAINER_multihashmap_get_multiple (ns->update_map, &hc,
                                                 &find_trees, &fc);
     if (UINT_MAX == fc.id)
     {
@@ -921,8 +921,8 @@
       GNUNET_CRYPTO_hash (nsn->id, strlen (nsn->id), &hc);
       fc.id = nsn->tree_id;
       fc.nug = nug;
-      fc.namespace = namespace;
-      GNUNET_CONTAINER_multihashmap_get_multiple (namespace->update_map, &hc,
+      fc.ns = ns;
+      GNUNET_CONTAINER_multihashmap_get_multiple (ns->update_map, &hc,
                                                   &find_trees, &fc);
     }
     else

Modified: gnunet/src/fs/fs_publish.c
===================================================================
--- gnunet/src/fs/fs_publish.c  2012-09-10 20:33:02 UTC (rev 23743)
+++ gnunet/src/fs/fs_publish.c  2012-09-10 22:17:19 UTC (rev 23744)
@@ -83,10 +83,10 @@
     pc->fhc = NULL;
   }
   GNUNET_FS_file_information_destroy (pc->fi, NULL, NULL);
-  if (pc->namespace != NULL)
+  if (pc->ns != NULL)
   {
-    GNUNET_FS_namespace_delete (pc->namespace, GNUNET_NO);
-    pc->namespace = NULL;
+    GNUNET_FS_namespace_delete (pc->ns, GNUNET_NO);
+    pc->ns = NULL;
   }
   GNUNET_free_non_null (pc->nid);
   GNUNET_free_non_null (pc->nuid);
@@ -269,8 +269,8 @@
 static void
 publish_sblock (struct GNUNET_FS_PublishContext *pc)
 {
-  if (NULL != pc->namespace)
-    pc->sks_pc = GNUNET_FS_publish_sks (pc->h, pc->namespace, pc->nid, 
pc->nuid,
+  if (NULL != pc->ns)
+    pc->sks_pc = GNUNET_FS_publish_sks (pc->h, pc->ns, pc->nid, pc->nuid,
                                        pc->fi->meta, pc->fi->chk_uri, 
&pc->fi->bo,
                                        pc->options, &publish_sblocks_cont, pc);
   else
@@ -1105,7 +1105,7 @@
  *
  * @param h handle to the file sharing subsystem
  * @param fi information about the file or directory structure to publish
- * @param namespace namespace to publish the file in, NULL for no namespace
+ * @param ns namespace to publish the file in, NULL for no namespace
  * @param nid identifier to use for the publishd content in the namespace
  *        (can be NULL, must be NULL if namespace is NULL)
  * @param nuid update-identifier that will be used for future updates
@@ -1116,7 +1116,7 @@
 struct GNUNET_FS_PublishContext *
 GNUNET_FS_publish_start (struct GNUNET_FS_Handle *h,
                          struct GNUNET_FS_FileInformation *fi,
-                         struct GNUNET_FS_Namespace *namespace, const char 
*nid,
+                         struct GNUNET_FS_Namespace *ns, const char *nid,
                          const char *nuid,
                          enum GNUNET_FS_PublishOptions options)
 {
@@ -1138,11 +1138,11 @@
   ret->dsh = dsh;
   ret->h = h;
   ret->fi = fi;
-  ret->namespace = namespace;
+  ret->ns = ns;
   ret->options = options;
-  if (namespace != NULL)
+  if (ns != NULL)
   {
-    namespace->rc++;
+    ns->rc++;
     GNUNET_assert (NULL != nid);
     ret->nid = GNUNET_strdup (nid);
     if (NULL != nuid)

Modified: gnunet/src/fs/fs_search.c
===================================================================
--- gnunet/src/fs/fs_search.c   2012-09-10 20:33:02 UTC (rev 23743)
+++ gnunet/src/fs/fs_search.c   2012-09-10 22:17:19 UTC (rev 23744)
@@ -505,7 +505,7 @@
   if (0 == strlen (id_update))
     return;                     /* no updates */
   uu.type = sks;
-  uu.data.sks.namespace = sc->uri->data.sks.namespace;
+  uu.data.sks.ns = sc->uri->data.sks.ns;
   uu.data.sks.identifier = GNUNET_strdup (id_update);
   (void) search_start (sc->h, &uu, sc->anonymity, sc->options, NULL, sr);
   GNUNET_free (uu.data.sks.identifier);
@@ -671,13 +671,13 @@
   uri->data.sks.identifier = GNUNET_strdup (pt);
   GNUNET_CRYPTO_hash (&nb->subspace,
                       sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded),
-                      &uri->data.sks.namespace);
+                      &uri->data.sks.ns);
   uris = GNUNET_FS_uri_to_string (uri);
   GNUNET_CONTAINER_meta_data_insert (meta, "<gnunet>", EXTRACTOR_METATYPE_URI,
                                      EXTRACTOR_METAFORMAT_UTF8, "text/plain",
                                      uris, strlen (uris) + 1);
   GNUNET_free (uris);
-  GNUNET_PSEUDONYM_add (sc->h->cfg, &uri->data.sks.namespace, meta);
+  GNUNET_PSEUDONYM_add (sc->h->cfg, &uri->data.sks.ns, meta);
   /* process */
   process_ksk_result (sc, &sc->requests[i], uri, meta);
 
@@ -1058,7 +1058,7 @@
     GNUNET_assert (size >= msize);
     sm->type = htonl (GNUNET_BLOCK_TYPE_FS_SBLOCK);
     sm->anonymity_level = htonl (sc->anonymity);
-    sm->target = sc->uri->data.sks.namespace;
+    sm->target = sc->uri->data.sks.ns;
     identifier = sc->uri->data.sks.identifier;
     GNUNET_CRYPTO_hash (identifier, strlen (identifier), &key);
     GNUNET_CRYPTO_hash (&key, sizeof (struct GNUNET_HashCode), &idh);

Modified: gnunet/src/fs/fs_uri.c
===================================================================
--- gnunet/src/fs/fs_uri.c      2012-09-10 20:33:02 UTC (rev 23743)
+++ gnunet/src/fs/fs_uri.c      2012-09-10 22:17:19 UTC (rev 23744)
@@ -355,7 +355,7 @@
 uri_sks_parse (const char *s, char **emsg)
 {
   struct GNUNET_FS_Uri *ret;
-  struct GNUNET_HashCode namespace;
+  struct GNUNET_HashCode ns;
   char *identifier;
   unsigned int pos;
   size_t slen;
@@ -374,7 +374,7 @@
   }
   memcpy (enc, &s[pos], sizeof (struct GNUNET_CRYPTO_HashAsciiEncoded));
   enc[sizeof (struct GNUNET_CRYPTO_HashAsciiEncoded) - 1] = '\0';
-  if (GNUNET_OK != GNUNET_CRYPTO_hash_from_string (enc, &namespace))
+  if (GNUNET_OK != GNUNET_CRYPTO_hash_from_string (enc, &ns))
   {
     *emsg = GNUNET_strdup (_("Malformed SKS URI"));
     return NULL;
@@ -383,7 +383,7 @@
       GNUNET_strdup (&s[pos + sizeof (struct GNUNET_CRYPTO_HashAsciiEncoded)]);
   ret = GNUNET_malloc (sizeof (struct GNUNET_FS_Uri));
   ret->type = sks;
-  ret->data.sks.namespace = namespace;
+  ret->data.sks.ns = ns;
   ret->data.sks.identifier = identifier;
   return ret;
 }
@@ -949,7 +949,7 @@
   ns_uri = GNUNET_malloc (sizeof (struct GNUNET_FS_Uri));
   ns_uri->type = sks;
   GNUNET_CRYPTO_rsa_key_get_public (ns->key, &pk);
-  GNUNET_CRYPTO_hash (&pk, sizeof (pk), &ns_uri->data.sks.namespace);
+  GNUNET_CRYPTO_hash (&pk, sizeof (pk), &ns_uri->data.sks.ns);
   ns_uri->data.sks.identifier = GNUNET_strdup (id);
   return ns_uri;
 }
@@ -969,7 +969,7 @@
 
   ns_uri = GNUNET_malloc (sizeof (struct GNUNET_FS_Uri));
   ns_uri->type = sks;
-  ns_uri->data.sks.namespace = *nsid;
+  ns_uri->data.sks.ns = *nsid;
   ns_uri->data.sks.identifier = GNUNET_strdup (id);
   return ns_uri;
 }
@@ -1272,7 +1272,7 @@
     return GNUNET_NO;
   case sks:
     if ((0 ==
-         memcmp (&u1->data.sks.namespace, &u2->data.sks.namespace,
+         memcmp (&u1->data.sks.ns, &u2->data.sks.ns,
                  sizeof (struct GNUNET_HashCode))) &&
         (0 == strcmp (u1->data.sks.identifier, u2->data.sks.identifier)))
 
@@ -1341,7 +1341,7 @@
     GNUNET_break (0);
     return GNUNET_SYSERR;
   }
-  *nsid = uri->data.sks.namespace;
+  *nsid = uri->data.sks.ns;
   return GNUNET_OK;
 }
 
@@ -1382,9 +1382,9 @@
 
   if (uri->type != sks)
     return NULL;
-  (void) GNUNET_PSEUDONYM_get_info (cfg, &uri->data.sks.namespace,
+  (void) GNUNET_PSEUDONYM_get_info (cfg, &uri->data.sks.ns,
                                    NULL, NULL, &name, NULL);
-  unique_name = GNUNET_PSEUDONYM_name_uniquify (cfg, &uri->data.sks.namespace, 
name, NULL);
+  unique_name = GNUNET_PSEUDONYM_name_uniquify (cfg, &uri->data.sks.ns, name, 
NULL);
   GNUNET_free (name);
   GNUNET_asprintf (&ret, "%s: %s", unique_name, uri->data.sks.identifier);
   GNUNET_free (unique_name);
@@ -1931,18 +1931,18 @@
 static char *
 uri_sks_to_string (const struct GNUNET_FS_Uri *uri)
 {
-  const struct GNUNET_HashCode *namespace;
+  const struct GNUNET_HashCode *ns;
   const char *identifier;
   char *ret;
-  struct GNUNET_CRYPTO_HashAsciiEncoded ns;
+  struct GNUNET_CRYPTO_HashAsciiEncoded nsasc;
 
   if (uri->type != sks)
     return NULL;
-  namespace = &uri->data.sks.namespace;
+  ns = &uri->data.sks.ns;
   identifier = uri->data.sks.identifier;
-  GNUNET_CRYPTO_hash_to_enc (namespace, &ns);
+  GNUNET_CRYPTO_hash_to_enc (ns, &nsasc);
   GNUNET_asprintf (&ret, "%s%s%s/%s", GNUNET_FS_URI_PREFIX,
-                   GNUNET_FS_URI_SKS_INFIX, (const char *) &ns, identifier);
+                   GNUNET_FS_URI_SKS_INFIX, (const char *) &nsasc, identifier);
   return ret;
 }
 

Modified: gnunet/src/include/gnunet_fs_service.h
===================================================================
--- gnunet/src/include/gnunet_fs_service.h      2012-09-10 20:33:02 UTC (rev 
23743)
+++ gnunet/src/include/gnunet_fs_service.h      2012-09-10 22:17:19 UTC (rev 
23744)
@@ -55,7 +55,7 @@
  * 9.0.0: CPS-style integrated API
  * 9.1.1: asynchronous directory scanning
  */
-#define GNUNET_FS_VERSION 0x00090102
+#define GNUNET_FS_VERSION 0x00090103
 
 
 /* ******************** URI API *********************** */
@@ -1396,7 +1396,7 @@
           */
           struct GNUNET_HashCode id;
 
-        } namespace;
+        } ns;
 
       } specifics;
 
@@ -1994,7 +1994,7 @@
  *
  * @param h handle to the file sharing subsystem
  * @param fi information about the file or directory structure to publish
- * @param namespace namespace to publish the file in, NULL for no namespace
+ * @param ns namespace to publish the file in, NULL for no namespace
  * @param nid identifier to use for the publishd content in the namespace
  *        (can be NULL, must be NULL if namespace is NULL)
  * @param nuid update-identifier that will be used for future updates
@@ -2005,7 +2005,7 @@
 struct GNUNET_FS_PublishContext *
 GNUNET_FS_publish_start (struct GNUNET_FS_Handle *h,
                          struct GNUNET_FS_FileInformation *fi,
-                         struct GNUNET_FS_Namespace *namespace, const char 
*nid,
+                         struct GNUNET_FS_Namespace *ns, const char *nid,
                          const char *nuid,
                          enum GNUNET_FS_PublishOptions options);
 
@@ -2083,7 +2083,7 @@
  * Publish an SBlock on GNUnet.
  *
  * @param h handle to the file sharing subsystem
- * @param namespace namespace to publish in
+ * @param ns namespace to publish in
  * @param identifier identifier to use
  * @param update update identifier to use
  * @param meta metadata to use
@@ -2096,7 +2096,7 @@
  */
 struct GNUNET_FS_PublishSksContext *
 GNUNET_FS_publish_sks (struct GNUNET_FS_Handle *h,
-                       struct GNUNET_FS_Namespace *namespace,
+                       struct GNUNET_FS_Namespace *ns,
                        const char *identifier, const char *update,
                        const struct GNUNET_CONTAINER_MetaData *meta,
                        const struct GNUNET_FS_Uri *uri,
@@ -2188,7 +2188,7 @@
  *
  * @param h handle to the file sharing subsystem
  * @param ksk_uri keywords to use for advertisment
- * @param namespace handle for the namespace that should be advertised
+ * @param ns handle for the namespace that should be advertised
  * @param meta meta-data for the namespace advertisement
  * @param bo block options
  * @param rootEntry name of the root of the namespace
@@ -2199,7 +2199,7 @@
 struct GNUNET_FS_AdvertisementContext *
 GNUNET_FS_namespace_advertise (struct GNUNET_FS_Handle *h,
                                struct GNUNET_FS_Uri *ksk_uri,
-                               struct GNUNET_FS_Namespace *namespace,
+                               struct GNUNET_FS_Namespace *ns,
                                const struct GNUNET_CONTAINER_MetaData *meta,
                                const struct GNUNET_FS_BlockOptions *bo,
                                const char *rootEntry,
@@ -2243,14 +2243,14 @@
  * memory) or also to freeze the namespace to prevent further
  * insertions by anyone.
  *
- * @param namespace handle to the namespace that should be deleted / freed
+ * @param ns handle to the namespace that should be deleted / freed
  * @param freeze prevents future insertions; creating a namespace
  *        with the same name again will create a fresh namespace instead
  *
  * @return GNUNET_OK on success, GNUNET_SYSERR on error
  */
 int
-GNUNET_FS_namespace_delete (struct GNUNET_FS_Namespace *namespace, int freeze);
+GNUNET_FS_namespace_delete (struct GNUNET_FS_Namespace *ns, int freeze);
 
 
 /**
@@ -2312,13 +2312,13 @@
  * cause the library to call "ip" with all children of the node.  Note
  * that cycles within an SCC are possible (including self-loops).
  *
- * @param namespace namespace to inspect for updateable content
+ * @param ns namespace to inspect for updateable content
  * @param next_id ID to look for; use NULL to look for SCC roots
  * @param ip function to call on each updateable identifier
  * @param ip_cls closure for ip
  */
 void
-GNUNET_FS_namespace_list_updateable (struct GNUNET_FS_Namespace *namespace,
+GNUNET_FS_namespace_list_updateable (struct GNUNET_FS_Namespace *ns,
                                      const char *next_id,
                                      GNUNET_FS_IdentifierProcessor ip,
                                      void *ip_cls);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]