Command bytarget returns name of target (if defined).
authorAdam Dickmeiss <adam@indexdata.dk>
Mon, 24 Nov 2008 16:58:07 +0000 (17:58 +0100)
committerAdam Dickmeiss <adam@indexdata.dk>
Mon, 24 Nov 2008 16:59:26 +0000 (17:59 +0100)
src/http_command.c

index 426b357..b9945ba 100644 (file)
@@ -423,6 +423,13 @@ static void cmd_bytarget(struct http_channel *c)
         wrbuf_xmlputs(c->wrbuf, ht[i].id);
         wrbuf_puts(c->wrbuf, "</id>\n");
 
+        if (ht[i].name && ht[i].name[0]) 
+        {
+            wrbuf_puts(c->wrbuf, "<name>");
+            wrbuf_xmlputs(c->wrbuf, ht[i].name);
+            wrbuf_puts(c->wrbuf, "</name>\n");
+        }
+
         wrbuf_printf(c->wrbuf, "<hits>%d</hits>\n", ht[i].hits);
         wrbuf_printf(c->wrbuf, "<diagnostic>%d</diagnostic>\n", ht[i].diagnostic);
         wrbuf_printf(c->wrbuf, "<records>%d</records>\n", ht[i].records);