Closed grahamehorner closed 7 years ago
The mutex is required to protect the three global variables that are being set to the gateway location to make sure those are not accessed while being updated (as the update of three variables is not an atomic operation). The call to get the information does not need protection as that code uses only local variables (i is also a local variable). The code is correct as is in my opinion.
mp_pkt_forwarder mutex needs to protect the result from the call to lgw_gps_get(NULL, NULL, &coord, &gpserr) (also for consistency with similar code above)