[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r9704 - in GNUnet: doc/man src/applications/fs/tools
From: |
gnunet |
Subject: |
[GNUnet-SVN] r9704 - in GNUnet: doc/man src/applications/fs/tools |
Date: |
Sat, 5 Dec 2009 19:47:14 +0100 |
Author: grothoff
Date: 2009-12-05 19:47:14 +0100 (Sat, 05 Dec 2009)
New Revision: 9704
Modified:
GNUnet/doc/man/gnunet-pseudonym.1
GNUnet/src/applications/fs/tools/gnunet-pseudonym.c
Log:
fix #1481
Modified: GNUnet/doc/man/gnunet-pseudonym.1
===================================================================
--- GNUnet/doc/man/gnunet-pseudonym.1 2009-12-05 13:29:22 UTC (rev 9703)
+++ GNUnet/doc/man/gnunet-pseudonym.1 2009-12-05 18:47:14 UTC (rev 9704)
@@ -45,6 +45,9 @@
\fB\-k KEYWORD\fR, \fB\-\-keyword=KEYWORD\fR
Publish the namespace advertisement under the keyword 'KEYWORD'. Default is
'namespace' (use with \-C). You can specify \-k multiple times. In that case,
the namespace will be published under each of those keywords.
.TP
+\fB\-l\fR, \fB\-\-local\-only\fR
+only display local namespaces (those that we can extend with content because
we created them)
+.TP
\fB\-m MIMETYPE\fR, \fB\-\-mimetype=MIMETYPE\fR
Advertise that the namespace contains files of the given MIMETYPE (use with
\-C).
.TP
Modified: GNUnet/src/applications/fs/tools/gnunet-pseudonym.c
===================================================================
--- GNUnet/src/applications/fs/tools/gnunet-pseudonym.c 2009-12-05 13:29:22 UTC
(rev 9703)
+++ GNUnet/src/applications/fs/tools/gnunet-pseudonym.c 2009-12-05 18:47:14 UTC
(rev 9704)
@@ -50,6 +50,8 @@
static char *root_name;
+static int local_only;
+
static unsigned int anonymity;
static unsigned int priority = 365;
@@ -84,6 +86,10 @@
0, &GNUNET_getopt_configure_set_one, &stop_collection},
GNUNET_COMMAND_LINE_OPTION_HELP (gettext_noop ("Create new pseudonyms,
delete pseudonyms or list existing pseudonyms.")), /* -h */
GNUNET_COMMAND_LINE_OPTION_LOGGING, /* -L */
+ {'l', "local-only", NULL,
+ gettext_noop
+ ("only display local namespaces"),
+ 0, &GNUNET_getopt_configure_set_one, &local_only},
{'k', "keyword", "KEYWORD",
gettext_noop
("use the given keyword to advertise the namespace (use when creating a new
pseudonym)"),
@@ -138,6 +144,11 @@
int cpos;
char *namespaceName;
+ if ( (local_only != 0) &&
+ (GNUNET_OK != GNUNET_ECRS_namespace_test_exists (NULL,
+ cfg,
+ id)) )
+ return GNUNET_OK;
namespaceName = GNUNET_pseudonym_id_to_name (ectx, cfg, id);
GNUNET_hash_to_enc (id, &enc);
if ( (namespaceName != NULL) &&
@@ -214,6 +225,7 @@
printf (_("Collection stopped.\n"));
else
printf (_("Failed to stop collection (not active?).\n"));
+ be_quiet = 1;
}
/* delete pseudonyms */
@@ -238,6 +250,7 @@
printf (_("\tUnknown namespace `%s'\n"), delete_name);
}
GNUNET_free (delete_name);
+ be_quiet = 1;
}
/* create collections / namespace */
@@ -257,6 +270,7 @@
printf ("%s", _("Failed to start collection.\n"));
success++;
}
+ be_quiet = 1;
}
else
{ /* no collection */
@@ -300,10 +314,12 @@
root = GNUNET_ECRS_uri_to_string (rootURI);
printf (_("Namespace `%s' created (root: %s).\n"),
ns_name, root);
+ printf (_("Note that a number was appended to your selected name
to ensure uniqueness on your system.\n"));
GNUNET_free (ns_name);
GNUNET_free (root);
GNUNET_ECRS_uri_destroy (rootURI);
}
+ be_quiet = 1;
if (NULL != advertisement)
GNUNET_ECRS_uri_destroy (advertisement);
}
@@ -314,9 +330,12 @@
else
{
if (start_collection)
- printf (_
- ("You must specify a name for the collection (`%s'
option).\n"),
- "-C");
+ {
+ printf (_
+ ("You must specify a name for the collection (`%s'
option).\n"),
+ "-C");
+ be_quiet = 1;
+ }
}
if (0 == be_quiet)
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r9704 - in GNUnet: doc/man src/applications/fs/tools,
gnunet <=