diff -r 793c09ece542 -r 6bdda35b4a13 thermferm/thermferm.c --- a/thermferm/thermferm.c Thu Aug 14 22:02:33 2014 +0200 +++ b/thermferm/thermferm.c Thu Aug 14 22:43:41 2014 +0200 @@ -252,7 +252,13 @@ for (device = Config.devices; device; device = device->next) { if (strcmp(address, device->uuid) == 0) { +#ifdef HAVE_WIRINGPI_H + piLock(LOCK_DEVICES); +#endif tmp = device->value + device->offset; +#ifdef HAVE_WIRINGPI_H + piUnlock(LOCK_DEVICES); +#endif *val = tmp; return device->present; }