From 9ed7e1480ea9d3b7398aff5b0591aa94becf2cbe Mon Sep 17 00:00:00 2001
From: Ramakrishnan Muthukrishnan <ram@rkrishnan.org>
Date: Tue, 11 Jan 2022 21:49:10 +0530
Subject: [PATCH] af gain: for now, directly change receiver[0]'s gain

---
 rigctl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/rigctl.c b/rigctl.c
index 100c98f..2040982 100644
--- a/rigctl.c
+++ b/rigctl.c
@@ -953,12 +953,12 @@ gboolean parse_extended_cmd(char *command, CLIENT *client) {
       // read/set audio gain
       if (command[4] == ';') {
         // send reply back
-        sprintf(reply, "ZZAG%03d;", (int)(active_receiver->volume * 100.0));
+        sprintf(reply, "ZZAG%03d;", (int)(receiver[0]->volume * 100.0));
         send_resp(client->fd, reply);
       } else if (command[7] == ';') {
           command[7] = '\0';
           int gain = atoi(&command[4]);
-          active_receiver->volume = (double)gain / 100.0;
+          receiver[0]->volume = (double)gain / 100.0;
           update_af_gain();
       }
       break;
-- 
2.45.2