chiark / gitweb /
Use the new mLib macros for discarding uninteresting error codes.
[tripe] / server / admin.c
index 0e3effb0a00389324e2d1b5939402961809432d5..487010e18e213ae70255cdd40261b2342d92ddae 100644 (file)
@@ -1831,13 +1831,15 @@ static void acmd_peerinfo(admin *a, unsigned ac, char *av[])
 {
   peer *p;
   const peerspec *ps;
+  const char *ptag;
 
   if ((p = a_findpeer(a, av[0])) != 0) {
     ps = p_spec(p);
     a_info(a, "tunnel=%s", ps->tops->name, A_END);
     a_info(a, "key=%s", p_tag(p),
           "current-key=%s", p->kx.kpub->tag, A_END);
-    a_info(a, "private-key=%s", p_privtag(p),
+    if ((ptag = p_privtag(p)) == 0) ptag = "(default)";
+    a_info(a, "private-key=%s", ptag,
           "current-private-key=%s", p->kx.kpriv->tag, A_END);
     a_info(a, "keepalive=%lu", ps->t_ka, A_END);
     a_ok(a);