[Bluez PATCH v1] core: Fix loading AVDTP options

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Yun-Hao Chung <howardchung@xxxxxxxxxxxx>

Fix misassigned AVDTP StreamMode option, which causes StreamMode not
being set.
Fix AVDTP SessionMode option not freed.

Reviewed-by: mmandlik@xxxxxxxxxxxx
Reviewed-by: apusaka@xxxxxxxxxxxx
---

 src/main.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/main.c b/src/main.c
index c32bda7d407d..7612d6984890 100644
--- a/src/main.c
+++ b/src/main.c
@@ -774,9 +774,10 @@ static void parse_config(GKeyFile *config)
 			DBG("Invalid mode option: %s", str);
 			btd_opts.avdtp.session_mode = BT_IO_MODE_BASIC;
 		}
+		g_free(str);
 	}
 
-	val = g_key_file_get_integer(config, "AVDTP", "StreamMode", &err);
+	str = g_key_file_get_string(config, "AVDTP", "StreamMode", &err);
 	if (err) {
 		DBG("%s", err->message);
 		g_clear_error(&err);
@@ -791,6 +792,7 @@ static void parse_config(GKeyFile *config)
 			DBG("Invalid mode option: %s", str);
 			btd_opts.avdtp.stream_mode = BT_IO_MODE_BASIC;
 		}
+		g_free(str);
 	}
 
 	parse_br_config(config);
-- 
2.31.1.607.g51e8a6a459-goog




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux