8devices / wakaama

Eclipse Wakaama (formerly liblwm2m) is an implementation of the Open Mobile Alliance's LightWeight M2M protocol (LWM2M).
0 stars 4 forks source link

restserver: lock rest context #20

Closed GiedriusM closed 6 years ago

GiedriusM commented 6 years ago

Ulfius calls each request callback from a new thread. This PR adds mutex to rest context that should prevent data corruption and the arising segfaults.

codecov-io commented 6 years ago

Codecov Report

Merging #20 into master-rest will increase coverage by 0.7%. The diff coverage is 70.37%.

Impacted file tree graph

@@              Coverage Diff               @@
##           master-rest      #20     +/-   ##
==============================================
+ Coverage        65.04%   65.74%   +0.7%     
==============================================
  Files                9        9             
  Lines              615      648     +33     
==============================================
+ Hits               400      426     +26     
- Misses             215      222      +7
Impacted Files Coverage Δ
examples/rest-server/rest-core.c 53.12% <100%> (+8.68%) :arrow_up:
examples/rest-server/rest-endpoints.c 87.5% <100%> (+0.7%) :arrow_up:
examples/rest-server/restserver.c 73.68% <100%> (+0.95%) :arrow_up:
examples/rest-server/rest-notifications.c 55.2% <27.27%> (-0.64%) :arrow_down:
examples/rest-server/rest-resources.c 48.59% <64.28%> (+2.13%) :arrow_up:
examples/rest-server/rest-subscriptions.c 76.47% <75%> (-0.2%) :arrow_down:

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 508cccd...a1bd4c3. Read the comment docs.