summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-08-08 21:40:39 +0000
committerChristian Grothoff <christian@grothoff.org>2013-08-08 21:40:39 +0000
commit46d9f8f827c8f797ae7d0fbfa3392e50d75a6006 (patch)
treecd15d07acb4f638fef2560e4a0a88a0d180570a1
parentff08ed780d1ac73d4fdee2ad24f24b64d5828344 (diff)
-working on identity service create/rename/delete
-rw-r--r--doc/man/gnunet-identity.16
-rw-r--r--src/identity/gnunet-identity.c12
2 files changed, 10 insertions, 8 deletions
diff --git a/doc/man/gnunet-identity.1 b/doc/man/gnunet-identity.1
index 6c48c8e2a..be6714cda 100644
--- a/doc/man/gnunet-identity.1
+++ b/doc/man/gnunet-identity.1
@@ -25,12 +25,12 @@ Delete the ego with the given NAME.
Print help page.
.TP
-\fB\-L\fR, \fB\-\-list\fR
-list all ouf our egos
+\fB\-d\fR, \fB\-\-display\fR
+display all ouf our egos
.TP
\fB\-m\fR, \fB\-\-monitor\fR
-run in monitor mode, listing all ouf our egos until CTRL-C is pressed
+run in monitor mode, listing all ouf our egos until CTRL-C is pressed. Each ego is listed together with a unique pointer value; if egos are renamed, that pointer value remains the same; if egos are deleted, they are listed one more time with a name of "<null>".
.SH FILES
diff --git a/src/identity/gnunet-identity.c b/src/identity/gnunet-identity.c
index 6981b3709..e56a05807 100644
--- a/src/identity/gnunet-identity.c
+++ b/src/identity/gnunet-identity.c
@@ -176,8 +176,7 @@ print_ego (void *cls,
struct GNUNET_IDENTITY_Ego *ego,
void **ctx,
const char *identifier)
-{
-
+{
if (! (list | monitor))
return;
if ( (NULL == ego) && (! monitor) )
@@ -185,7 +184,10 @@ print_ego (void *cls,
GNUNET_SCHEDULER_shutdown ();
return;
}
- fprintf (stderr, "%s\n", identifier);
+ if (monitor)
+ fprintf (stderr, "%s - %p\n", identifier, ego);
+ else if (NULL != identifier)
+ fprintf (stderr, "%s\n", identifier);
}
@@ -237,8 +239,8 @@ main (int argc, char *const *argv)
{'D', "delete", "NAME",
gettext_noop ("delete ego NAME "),
1, &GNUNET_GETOPT_set_string, &delete_ego},
- {'L', "list", NULL,
- gettext_noop ("list all egos"),
+ {'d', "display", NULL,
+ gettext_noop ("display all egos"),
0, &GNUNET_GETOPT_set_one, &list},
{'m', "monitor", NULL,
gettext_noop ("run in monitor mode egos"),