changeset 161:da6950e936bf

fc-tmsh: proper handling of auw responses
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 17 Mar 2017 08:00:19 +0000
parents e4c98a2c1673
children ce7479d28b02
files rvinterf/tmsh/audioresp.c
diffstat 1 files changed, 12 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/rvinterf/tmsh/audioresp.c	Fri Mar 17 07:49:12 2017 +0000
+++ b/rvinterf/tmsh/audioresp.c	Fri Mar 17 08:00:19 2017 +0000
@@ -43,7 +43,18 @@
 static void
 auw_response()
 {
-	print_etm_pkt_raw("auw response");
+	char buf[80];
+
+	if (rvi_msg_len != 7) {
+		print_etm_pkt_raw("auw response wrong length");
+		return;
+	}
+	if (rvi_msg[3])
+		sprintf(buf, "auw %u error %u (0x%02X)", rvi_msg[5],
+			rvi_msg[3], rvi_msg[3]);
+	else
+		sprintf(buf, "auw %u OK", rvi_msg[5]);
+	async_msg_output(buf);
 }
 
 void