aboutsummaryrefslogtreecommitdiff
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)
downloadgnunet-46d9f8f827c8f797ae7d0fbfa3392e50d75a6006.tar.gz
gnunet-46d9f8f827c8f797ae7d0fbfa3392e50d75a6006.zip
-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.
25Print help page. 25Print help page.
26 26
27.TP 27.TP
28\fB\-L\fR, \fB\-\-list\fR 28\fB\-d\fR, \fB\-\-display\fR
29list all ouf our egos 29display all ouf our egos
30 30
31.TP 31.TP
32\fB\-m\fR, \fB\-\-monitor\fR 32\fB\-m\fR, \fB\-\-monitor\fR
33run in monitor mode, listing all ouf our egos until CTRL-C is pressed 33run 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>".
34 34
35 35
36.SH FILES 36.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,
176 struct GNUNET_IDENTITY_Ego *ego, 176 struct GNUNET_IDENTITY_Ego *ego,
177 void **ctx, 177 void **ctx,
178 const char *identifier) 178 const char *identifier)
179{ 179{
180
181 if (! (list | monitor)) 180 if (! (list | monitor))
182 return; 181 return;
183 if ( (NULL == ego) && (! monitor) ) 182 if ( (NULL == ego) && (! monitor) )
@@ -185,7 +184,10 @@ print_ego (void *cls,
185 GNUNET_SCHEDULER_shutdown (); 184 GNUNET_SCHEDULER_shutdown ();
186 return; 185 return;
187 } 186 }
188 fprintf (stderr, "%s\n", identifier); 187 if (monitor)
188 fprintf (stderr, "%s - %p\n", identifier, ego);
189 else if (NULL != identifier)
190 fprintf (stderr, "%s\n", identifier);
189} 191}
190 192
191 193
@@ -237,8 +239,8 @@ main (int argc, char *const *argv)
237 {'D', "delete", "NAME", 239 {'D', "delete", "NAME",
238 gettext_noop ("delete ego NAME "), 240 gettext_noop ("delete ego NAME "),
239 1, &GNUNET_GETOPT_set_string, &delete_ego}, 241 1, &GNUNET_GETOPT_set_string, &delete_ego},
240 {'L', "list", NULL, 242 {'d', "display", NULL,
241 gettext_noop ("list all egos"), 243 gettext_noop ("display all egos"),
242 0, &GNUNET_GETOPT_set_one, &list}, 244 0, &GNUNET_GETOPT_set_one, &list},
243 {'m', "monitor", NULL, 245 {'m', "monitor", NULL,
244 gettext_noop ("run in monitor mode egos"), 246 gettext_noop ("run in monitor mode egos"),