[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r4906 - in GNUnet: . src/applications/fs/namespace src/incl
From: |
gnunet |
Subject: |
[GNUnet-SVN] r4906 - in GNUnet: . src/applications/fs/namespace src/include |
Date: |
Sun, 3 Jun 2007 01:08:15 -0600 (MDT) |
Author: grothoff
Date: 2007-06-03 01:08:15 -0600 (Sun, 03 Jun 2007)
New Revision: 4906
Modified:
GNUnet/src/applications/fs/namespace/namespace_info.c
GNUnet/src/include/gnunet_namespace_lib.h
GNUnet/todo
Log:
clean up namespace directory on delete
Modified: GNUnet/src/applications/fs/namespace/namespace_info.c
===================================================================
--- GNUnet/src/applications/fs/namespace/namespace_info.c 2007-06-03
06:27:34 UTC (rev 4905)
+++ GNUnet/src/applications/fs/namespace/namespace_info.c 2007-06-03
07:08:15 UTC (rev 4906)
@@ -211,7 +211,41 @@
return ret;
}
+
/**
+ * Delete a local namespace.
+ *
+ * @return OK on success, SYSERR on error
+ */
+int NS_deleteNamespace(struct GE_Context * ectx,
+ struct GC_Configuration * cfg,
+ const char * namespaceName) {
+ int ret;
+ char * tmp;
+ char * fn;
+
+ ret = ECRS_deleteNamespace(ectx, cfg, namespaceName);
+ GC_get_configuration_value_filename(cfg,
+ "GNUNET",
+ "GNUNET_HOME",
+ GNUNET_HOME_DIRECTORY,
+ &tmp);
+ fn = MALLOC(strlen(tmp) + strlen(NS_UPDATE_DIR) +
+ strlen(namespaceName) + 20);
+ strcpy(fn, tmp);
+ FREE(tmp);
+ strcat(fn, DIR_SEPARATOR_STR);
+ strcat(fn, NS_UPDATE_DIR);
+ strcat(fn, namespaceName);
+ strcat(fn, DIR_SEPARATOR_STR);
+ disk_directory_remove(ectx, fn);
+ FREE(fn);
+ return ret;
+}
+
+
+
+/**
* Change the ranking of a (non-local) namespace.
*
* @param ns the name of the namespace, as obtained
@@ -730,19 +764,19 @@
&nid,
dst,
md);
- if (uri != NULL) {
- if (updateInterval != ECRS_SBLOCK_UPDATE_NONE) {
- fi.uri = uri;
- fi.meta = (struct ECRS_MetaData*) md;
- writeUpdateData(ectx,
- cfg,
- name,
- &tid,
- &nid,
- &fi,
- updateInterval,
- creationTime);
- }
+ if ( (uri != NULL) &&
+ (dst != NULL) ) {
+ fi.uri = ECRS_dupUri(dst);
+ fi.meta = (struct ECRS_MetaData*) md;
+ writeUpdateData(ectx,
+ cfg,
+ name,
+ &tid,
+ &nid,
+ &fi,
+ updateInterval,
+ creationTime);
+ ECRS_freeUri(fi.uri);
if (lastId != NULL) {
old = getUpdateDataFilename(ectx,
cfg,
Modified: GNUnet/src/include/gnunet_namespace_lib.h
===================================================================
--- GNUnet/src/include/gnunet_namespace_lib.h 2007-06-03 06:27:34 UTC (rev
4905)
+++ GNUnet/src/include/gnunet_namespace_lib.h 2007-06-03 07:08:15 UTC (rev
4906)
@@ -91,7 +91,9 @@
*
* @return OK on success, SYSERR on error
*/
-#define NS_deleteNamespace ECRS_deleteNamespace
+int NS_deleteNamespace(struct GE_Context * ectx,
+ struct GC_Configuration * cfg,
+ const char * namespaceName); /* namespace.c */
/**
* Change the ranking of a (non-local) namespace.
Modified: GNUnet/todo
===================================================================
--- GNUnet/todo 2007-06-03 06:27:34 UTC (rev 4905)
+++ GNUnet/todo 2007-06-03 07:08:15 UTC (rev 4906)
@@ -14,6 +14,10 @@
0.7.2 [5'07]:
- new features:
* HTTP transport (libcurl, libmicrohttpd) [#765] [likely 0.7.2a]
+- RC bugs:
+ * UDP assertion failure (mtu < size)
+ * gethostbyaddr crash (stack overflow? non-reentrant?)
+ * low connectivity (NAT?)
0.7.3 [7'07] (aka "features"):
- Chat support basics [RC]
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r4906 - in GNUnet: . src/applications/fs/namespace src/include,
gnunet <=