add GNUNET_FS_namespace_dup API call
authorChristian Grothoff <christian@grothoff.org>
Sat, 18 Feb 2012 15:16:33 +0000 (15:16 +0000)
committerChristian Grothoff <christian@grothoff.org>
Sat, 18 Feb 2012 15:16:33 +0000 (15:16 +0000)
src/fs/fs_namespace.c
src/include/gnunet_fs_service.h

index ec4e2495a6f987dff279ff53fa81329071ba631e..9cb8cd5a45d103cd667efe9255ffe3482a66d287 100644 (file)
@@ -519,6 +519,20 @@ GNUNET_FS_namespace_create (struct GNUNET_FS_Handle *h, const char *name)
 }
 
 
+/**
+ * Duplicate a namespace handle.
+ *
+ * @param ns namespace handle
+ * @return duplicated handle to the namespace
+ */
+struct GNUNET_FS_Namespace *
+GNUNET_FS_namespace_dup (struct GNUNET_FS_Namespace *ns)
+{
+  ns->rc++;
+  return ns;
+}
+
+
 /**
  * Delete a namespace handle.  Can be used for a clean shutdown (free
  * memory) or also to freeze the namespace to prevent further
index bfaa98364018361bfaa58010853cf880ba2135fb..0c739709d1ec7cd6ac57825cee1fd63148e3635a 100644 (file)
@@ -2156,6 +2156,16 @@ struct GNUNET_FS_Namespace *
 GNUNET_FS_namespace_create (struct GNUNET_FS_Handle *h, const char *name);
 
 
+/**
+ * Duplicate a namespace handle.
+ *
+ * @param ns namespace handle
+ * @return duplicated handle to the namespace
+ */
+struct GNUNET_FS_Namespace *
+GNUNET_FS_namespace_dup (struct GNUNET_FS_Namespace *ns);
+
+
 /**
  * Delete a namespace handle.  Can be used for a clean shutdown (free
  * memory) or also to freeze the namespace to prevent further