diff mbox series

[Bluez,v1] core: Fix loading AVDTP options

Message ID 20210507123246.Bluez.v1.1.I15d73dd47b94af906daa3f5a25d4fc5db8cc5b29@changeid
State New
Headers show
Series [Bluez,v1] core: Fix loading AVDTP options | expand

Commit Message

Yun-hao Chung May 7, 2021, 4:32 a.m. UTC
From: Yun-Hao Chung <howardchung@chromium.org>

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
---

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

Comments

bluez.test.bot@gmail.com May 7, 2021, 4:49 a.m. UTC | #1
This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=478213

---Test result---

Test Summary:
CheckPatch                    PASS      0.31 seconds
GitLint                       PASS      0.12 seconds
Prep - Setup ELL              PASS      45.60 seconds
Build - Prep                  PASS      0.10 seconds
Build - Configure             PASS      7.95 seconds
Build - Make                  PASS      193.97 seconds
Make Check                    PASS      9.40 seconds
Make Dist                     PASS      12.46 seconds
Make Dist - Configure         PASS      4.88 seconds
Make Dist - Make              PASS      80.65 seconds
Build w/ext ELL - Configure   PASS      8.34 seconds
Build w/ext ELL - Make        PASS      188.95 seconds

Details
##############################
Test: CheckPatch - PASS
Desc: Run checkpatch.pl script with rule in .checkpatch.conf

##############################
Test: GitLint - PASS
Desc: Run gitlint with rule in .gitlint

##############################
Test: Prep - Setup ELL - PASS
Desc: Clone, build, and install ELL

##############################
Test: Build - Prep - PASS
Desc: Prepare environment for build

##############################
Test: Build - Configure - PASS
Desc: Configure the BlueZ source tree

##############################
Test: Build - Make - PASS
Desc: Build the BlueZ source tree

##############################
Test: Make Check - PASS
Desc: Run 'make check'

##############################
Test: Make Dist - PASS
Desc: Run 'make dist' and build the distribution tarball

##############################
Test: Make Dist - Configure - PASS
Desc: Configure the source from distribution tarball

##############################
Test: Make Dist - Make - PASS
Desc: Build the source from distribution tarball

##############################
Test: Build w/ext ELL - Configure - PASS
Desc: Configure BlueZ source with '--enable-external-ell' configuration

##############################
Test: Build w/ext ELL - Make - PASS
Desc: Build BlueZ source with '--enable-external-ell' configuration



---
Regards,
Linux Bluetooth
Yun-hao Chung May 19, 2021, 3:50 a.m. UTC | #2
Hi linux-bluez,

Gentle ping.


On Fri, May 7, 2021 at 12:49 PM <bluez.test.bot@gmail.com> wrote:
>

> This is automated email and please do not reply to this email!

>

> Dear submitter,

>

> Thank you for submitting the patches to the linux bluetooth mailing list.

> This is a CI test results with your patch series:

> PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=478213

>

> ---Test result---

>

> Test Summary:

> CheckPatch                    PASS      0.31 seconds

> GitLint                       PASS      0.12 seconds

> Prep - Setup ELL              PASS      45.60 seconds

> Build - Prep                  PASS      0.10 seconds

> Build - Configure             PASS      7.95 seconds

> Build - Make                  PASS      193.97 seconds

> Make Check                    PASS      9.40 seconds

> Make Dist                     PASS      12.46 seconds

> Make Dist - Configure         PASS      4.88 seconds

> Make Dist - Make              PASS      80.65 seconds

> Build w/ext ELL - Configure   PASS      8.34 seconds

> Build w/ext ELL - Make        PASS      188.95 seconds

>

> Details

> ##############################

> Test: CheckPatch - PASS

> Desc: Run checkpatch.pl script with rule in .checkpatch.conf

>

> ##############################

> Test: GitLint - PASS

> Desc: Run gitlint with rule in .gitlint

>

> ##############################

> Test: Prep - Setup ELL - PASS

> Desc: Clone, build, and install ELL

>

> ##############################

> Test: Build - Prep - PASS

> Desc: Prepare environment for build

>

> ##############################

> Test: Build - Configure - PASS

> Desc: Configure the BlueZ source tree

>

> ##############################

> Test: Build - Make - PASS

> Desc: Build the BlueZ source tree

>

> ##############################

> Test: Make Check - PASS

> Desc: Run 'make check'

>

> ##############################

> Test: Make Dist - PASS

> Desc: Run 'make dist' and build the distribution tarball

>

> ##############################

> Test: Make Dist - Configure - PASS

> Desc: Configure the source from distribution tarball

>

> ##############################

> Test: Make Dist - Make - PASS

> Desc: Build the source from distribution tarball

>

> ##############################

> Test: Build w/ext ELL - Configure - PASS

> Desc: Configure BlueZ source with '--enable-external-ell' configuration

>

> ##############################

> Test: Build w/ext ELL - Make - PASS

> Desc: Build BlueZ source with '--enable-external-ell' configuration

>

>

>

> ---

> Regards,

> Linux Bluetooth

>
Tedd Ho-Jeong An May 19, 2021, 4:41 a.m. UTC | #3
Hi Howard,

On Fri, 2021-05-07 at 12:32 +0800, Howard Chung wrote:
> From: Yun-Hao Chung <howardchung@chromium.org>

> 

> 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 <tedd.an@intel.com>


> ---

> 

>  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);
Luiz Augusto von Dentz May 19, 2021, 6:10 p.m. UTC | #4
Hi Howard,

On Tue, May 18, 2021 at 9:41 PM Tedd Ho-Jeong An <hj.tedd.an@gmail.com> wrote:
>

> Hi Howard,

>

> On Fri, 2021-05-07 at 12:32 +0800, Howard Chung wrote:

> > From: Yun-Hao Chung <howardchung@chromium.org>

> >

> > 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 <tedd.an@intel.com>

>

> > ---

> >

> >  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);


Applied, thanks.

-- 
Luiz Augusto von Dentz
diff mbox series

Patch

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);