651:da166cb8470f | 652:16d3d4b58b5b |
---|---|
20 * Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. | 20 * Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. |
21 *****************************************************************************/ | 21 *****************************************************************************/ |
22 | 22 |
23 #include "rdconfig.h" | 23 #include "rdconfig.h" |
24 #include "thermferm.h" | 24 #include "thermferm.h" |
25 #include "delay.h" | |
25 #include "devices.h" | 26 #include "devices.h" |
26 #include "server.h" | 27 #include "server.h" |
27 #include "lcd-buffer.h" | 28 #include "lcd-buffer.h" |
28 #include "xutil.h" | 29 #include "xutil.h" |
29 #include "mqtt.h" | 30 #include "mqtt.h" |
1374 /* | 1375 /* |
1375 * Block main process | 1376 * Block main process |
1376 */ | 1377 */ |
1377 run_pause = TRUE; | 1378 run_pause = TRUE; |
1378 for (;;) { | 1379 for (;;) { |
1379 usleep(100000); | 1380 mDelay(100); |
1380 if (run_hold) | 1381 if (run_hold) |
1381 break; | 1382 break; |
1382 } | 1383 } |
1383 | 1384 |
1384 if (Config.units == NULL) { | 1385 if (Config.units == NULL) { |
1403 /* | 1404 /* |
1404 * Block main process. | 1405 * Block main process. |
1405 */ | 1406 */ |
1406 run_pause = TRUE; | 1407 run_pause = TRUE; |
1407 for (;;) { | 1408 for (;;) { |
1408 usleep(100000); | 1409 mDelay(100); |
1409 if (run_hold) | 1410 if (run_hold) |
1410 break; | 1411 break; |
1411 } | 1412 } |
1412 | 1413 |
1413 rc = delete_Unit(param); | 1414 rc = delete_Unit(param); |
1530 /* | 1531 /* |
1531 * Block main process | 1532 * Block main process |
1532 */ | 1533 */ |
1533 run_pause = TRUE; | 1534 run_pause = TRUE; |
1534 for (;;) { | 1535 for (;;) { |
1535 usleep(100000); | 1536 mDelay(100); |
1536 if (run_hold) | 1537 if (run_hold) |
1537 break; | 1538 break; |
1538 } | 1539 } |
1539 | 1540 |
1540 for (unit = Config.units ; unit; unit = unit->next) { | 1541 for (unit = Config.units ; unit; unit = unit->next) { |
2227 if (debug) | 2228 if (debug) |
2228 fprintf(stdout, "Thread my_server_loop stopped\n"); | 2229 fprintf(stdout, "Thread my_server_loop stopped\n"); |
2229 my_server_state = 0; | 2230 my_server_state = 0; |
2230 return 0; | 2231 return 0; |
2231 } | 2232 } |
2232 usleep(100000); | 2233 mDelay(100); |
2233 } | 2234 } |
2234 } | 2235 } |
2235 | 2236 |
2236 | 2237 |