diff options
-rw-r--r-- | libgps_core.c | 3 | ||||
-rw-r--r-- | shmexport.c | 1 |
2 files changed, 2 insertions, 2 deletions
diff --git a/libgps_core.c b/libgps_core.c index a326f4a3..c35ccbc5 100644 --- a/libgps_core.c +++ b/libgps_core.c @@ -112,8 +112,7 @@ int gps_read(struct gps_data_t *gpsdata) #ifdef SHM_EXPORT_ENABLE if (gpsdata->gps_fd == -1) { - gps_shm_read(gpsdata); - status = 0; + status = gps_shm_read(gpsdata); } #endif /* SHM_EXPORT_ENABLE */ diff --git a/shmexport.c b/shmexport.c index c79d4c08..eaf8ddf6 100644 --- a/shmexport.c +++ b/shmexport.c @@ -82,6 +82,7 @@ void shm_update(struct gps_context_t *context, struct gps_data_t *gpsdata) memcpy((void *)(context->shmexport + offsetof(struct shmexport_t, gpsdata)), (void *)gpsdata, sizeof(struct gps_data_t)); + barrier(); shared->gpsdata.gps_fd = -1; barrier(); shared->bookend1 = tick; |