+ info.account_in_session = 1;
+ return 0;
+}
+
+void handle_target_list (const char *name, const char *value)
+{
+ GwRes res;
+ const char *p;
+
+ if (strlen(name) < 10)
+ return;
+ if (memcmp (name, "gw.target.", 10))
+ return;
+ fprintf (reply_fd, "%s\n", name+10);
+ res = gw_res_init ();
+ gw_res_merge (res, value);
+ p = gw_res_get (res, "gw.description", NULL);
+ if (p)
+ {
+ put_esc_str (p);
+ put_esc_str ("\\n");
+ }
+ p = gw_res_get (res, "gw.databases", NULL);
+ if (p)
+ fprintf (reply_fd, " Databases: %s\n", p);
+ fprintf (reply_fd, "\n");
+ gw_res_close (res);
+}
+
+static int exec_target_list (void)
+{
+ gw_res_trav (info.kernel_res, NULL, handle_target_list);
+ fprintf (reply_fd, "\n");