From d7a56cad6d6ef3c2a5602fc604e31999eb9e78fa Mon Sep 17 00:00:00 2001 From: Matti Laakso Date: Tue, 27 May 2014 21:12:14 +0200 Subject: [PATCH] Fix printing of service versions Signed-off-by: Matti Laakso --- commands.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/commands.c b/commands.c index 4680511..8c06503 100644 --- a/commands.c +++ b/commands.c @@ -20,16 +20,20 @@ static void no_cb(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg * static void cmd_version_cb(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg) { struct qmi_ctl_get_version_info_response res; + void *c; char name_buf[16]; int i; qmi_parse_ctl_get_version_info_response(msg, &res); + + c = blobmsg_open_table(&status, NULL); for (i = 0; i < res.data.service_list_n; i++) { sprintf(name_buf, "service_%d", res.data.service_list[i].service); blobmsg_printf(&status, name_buf, "%d,%d", res.data.service_list[i].major_version, res.data.service_list[i].minor_version); } + blobmsg_close_table(&status, c); } static enum qmi_cmd_result -- 2.25.1