From ebc05bf9ed7336e6341bd94a07fa07063accc24b Mon Sep 17 00:00:00 2001 From: Dennis Schafroth Date: Tue, 1 Nov 2011 13:30:21 +0100 Subject: [PATCH] Suround by suggestions, if data in suggestions_xml --- src/http_command.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/http_command.c b/src/http_command.c index 587c908..a86aabb 100644 --- a/src/http_command.c +++ b/src/http_command.c @@ -642,8 +642,11 @@ static void cmd_bytarget(struct http_channel *c) wrbuf_puts(c->wrbuf, ht[i].settings_xml); wrbuf_puts(c->wrbuf, "\n"); } - if (ht[i].suggestions_xml) + if (ht[i].suggestions_xml && ht[i].suggestions_xml[0]) { + wrbuf_puts(c->wrbuf, ""); wrbuf_puts(c->wrbuf, ht[i].suggestions_xml); + wrbuf_puts(c->wrbuf, ""); + } wrbuf_puts(c->wrbuf, ""); } response_close(c, "bytarget"); -- 1.7.10.4