Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bluetooth: GATT: Auto init if bt_gatt_service_register is called #9848

Merged
merged 1 commit into from
Sep 10, 2018

Conversation

Vudentz
Copy link
Contributor

@Vudentz Vudentz commented Sep 7, 2018

This ensures the core services are always registered first and the
gatt_sc work is initialized.

Fixes #9785

Signed-off-by: Luiz Augusto von Dentz [email protected]

@Vudentz Vudentz requested review from jhedberg and lemrey September 7, 2018 10:00
@codecov-io
Copy link

codecov-io commented Sep 7, 2018

Codecov Report

Merging #9848 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #9848   +/-   ##
=======================================
  Coverage   52.28%   52.28%           
=======================================
  Files         213      213           
  Lines       25964    25964           
  Branches     5598     5598           
=======================================
  Hits        13576    13576           
  Misses      10150    10150           
  Partials     2238     2238

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c2d9807...e3f30be. Read the comment docs.

Copy link
Collaborator

@lemrey lemrey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! I verified that this patch fixes the issue I reported.

@carlescufi carlescufi added the bug The issue is a bug, or the PR is fixing a bug label Sep 7, 2018
@carlescufi carlescufi added this to the v1.13.0 milestone Sep 7, 2018
@@ -237,6 +238,9 @@ static void sc_process(struct k_work *work)

void bt_gatt_init(void)
{
if (!atomic_cas(&init, 0, 1))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

curly braces for this if statement...

This ensures the core services are always registered first and the
gatt_sc work is initialized.

Fixes zephyrproject-rtos#9785

Signed-off-by: Luiz Augusto von Dentz <[email protected]>
Signed-off-by: Anas Nashif <[email protected]>
@nashif nashif merged commit 148c7dd into zephyrproject-rtos:master Sep 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Bluetooth bug The issue is a bug, or the PR is fixing a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants