server/servutil.c: Reorder and categorize the functions.
[tripe] / server / admin.c
index 3774da0..867c424 100644 (file)
@@ -1286,14 +1286,12 @@ static void acmd_add(admin *a, unsigned ac, char *av[])
     OPTTIME("-keepalive", t, { add->peer.t_ka = t; })
     OPT("-cork", { add->peer.f |= KXF_CORK; })
     OPTARG("-key", arg, {
-      if (add->peer.tag)
-       xfree(add->peer.tag);
+      if (add->peer.tag) xfree(add->peer.tag);
       add->peer.tag = xstrdup(arg);
     })
     OPT("-mobile", { add->peer.f |= PSF_MOBILE; })
     OPTARG("-priv", arg, {
-      if (add->peer.privtag)
-       xfree(add->peer.privtag);
+      if (add->peer.privtag) xfree(add->peer.privtag);
       add->peer.privtag = xstrdup(arg);
     })
   });
@@ -1854,6 +1852,9 @@ static void acmd_peerinfo(admin *a, unsigned ac, char *av[])
     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_info(a, "corked=%s", BOOL(p->kx.f&KXF_CORK),
+          "mobile=%s", BOOL(ps->f&PSF_MOBILE),
+          A_END);
     a_ok(a);
   }
 }
@@ -1983,6 +1984,7 @@ static const acmd acmdtab[] = {
   { "reload",  0,                      0,      0,      acmd_reload },
   { "servinfo",        0,                      0,      0,      acmd_servinfo },
   { "setifname", "PEER NEW-NAME",      2,      2,      acmd_setifname },
+  { "stats",   "PEER",                 1,      1,      acmd_stats },
   { "svcclaim",        "SERVICE VERSION",      2,      2,      acmd_svcclaim },
   { "svcensure", "SERVICE [VERSION]",  1,      2,      acmd_svcensure },
   { "svcfail", "JOBID TOKENS...",      1,      0xffff, acmd_svcfail },
@@ -1993,7 +1995,6 @@ static const acmd acmdtab[] = {
   { "svcrelease", "SERVICE",           1,      1,      acmd_svcrelease },
   { "svcsubmit", "[OPTIONS] SERVICE TOKENS...",
                                        2,      0xffff, acmd_svcsubmit },
-  { "stats",   "PEER",                 1,      1,      acmd_stats },
 #ifndef NTRACE
   { "trace",   "[OPTIONS]",            0,      1,      acmd_trace },
 #endif