From e81158e362e2c7c9e2fb8bce430dbe415c37ad87 Mon Sep 17 00:00:00 2001 From: Dennis Schafroth Date: Thu, 12 Apr 2012 15:06:02 +0200 Subject: [PATCH] Lookup version and parse it on to perform_termlist --- src/http_command.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/http_command.c b/src/http_command.c index 0ab83ec..b75c9c9 100644 --- a/src/http_command.c +++ b/src/http_command.c @@ -513,8 +513,13 @@ static void cmd_settings(struct http_channel *c) static void termlist_response(struct http_channel *c, struct http_session *s, const char *cmd_status) { struct http_request *rq = c->request; - const char *name = http_argbyname(rq, "name"); - const char *nums = http_argbyname(rq, "num"); + const char *name = http_argbyname(rq, "name"); + const char *nums = http_argbyname(rq, "num"); + const char *version = http_argbyname(rq, "version"); + int version_no = 0; + if (version && strcmp(version, "")) { + version_no = atoi(version); + } int num = 15; int status; @@ -530,7 +535,7 @@ static void termlist_response(struct http_channel *c, struct http_session *s, co } wrbuf_printf(c->wrbuf, "%d\n", status); - perform_termlist(c, s->psession, name, num); + perform_termlist(c, s->psession, name, num, version_no); response_close(c, "termlist"); } -- 1.7.10.4