thermferm/thermferm.c

changeset 240
6bdda35b4a13
parent 238
a0f1deb65889
child 241
4ba138737bf4
--- 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;
 	}

mercurial