Skip to content

Commit

Permalink
lib: location: gnss: Fix setting of 'running' variable
Browse files Browse the repository at this point in the history
In method_gnss_location_get(), 'running' variable is set after
submitting method_gnss_prepare_work_fn() into location_api_workq.
It has been seen that 'running' is not set when
method_gnss_prepare_work_fn() is executed meaning that
location_request() was called from a lower priority thread than
location_api_workq. We need to set 'running' before submitting
method_gnss_prepare_work_fn() into location_api_workq.

Jira: NCSDK-27001

Signed-off-by: Tommi Rantanen <tommi.rantanen@nordicsemi.no>
  • Loading branch information
trantanen authored and nordicjm committed Apr 17, 2024
1 parent aebce7a commit ad5886a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/location/method_gnss.c
Original file line number Diff line number Diff line change
Expand Up @@ -1273,10 +1273,10 @@ int method_gnss_location_get(const struct location_request_info *request)
return err;
}

k_work_submit_to_queue(location_core_work_queue_get(), &method_gnss_prepare_work);

running = true;

k_work_submit_to_queue(location_core_work_queue_get(), &method_gnss_prepare_work);

return 0;
}

Expand Down

0 comments on commit ad5886a

Please sign in to comment.