Thread (5 messages) flat view 5 messages, 4 authors, 2021-05-19

Re: [Bluez PATCH v1] core: Fix loading AVDTP options

From: Tedd Ho-Jeong An <hidden>
Date: 2021-05-19 04:41:13

Hi Howard,

On Fri, 2021-05-07 at 12:32 +0800, Howard Chung wrote:
From: Yun-Hao Chung <redacted>

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

Reviewed-by: mmandlik@chromium.org
Reviewed-by: apusaka@chromium.org
Reviewed-by: Tedd Ho-Jeong An <redacted>
quoted hunk ↗ jump to hunk
---

 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);
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help