|
Lines 436-441
Link Here
|
| 436 |
/* measure time that functions need to process to substract from polling interval */ |
436 |
/* measure time that functions need to process to substract from polling interval */ |
| 437 |
gettimeofday(&tv_start, NULL); |
437 |
gettimeofday(&tv_start, NULL); |
| 438 |
|
438 |
|
|
|
439 |
/* ignore ACPI events if we went to sleep or the machine will possibly shutdown |
| 440 |
because of a pressed power button. Watch out the suspend/standby functions in |
| 441 |
acpi.cpp where the value for this variable is set to 1*/ |
| 442 |
if ( !acpidDied && FD_ISSET(hwEvent_fd, &temp_fd_set)){ |
| 443 |
pDebug(DBG_DEBUG, "hw FD %d is set, handling it ...\n", hwEvent_fd); |
| 444 |
// acpid socket died ? |
| 445 |
if (handleHWEventRequest() == -2) { |
| 446 |
acpidDied = true; |
| 447 |
close(hwEvent_fd); |
| 448 |
FD_CLR(hwEvent_fd, &fd_set_reading); |
| 449 |
pDebug (DBG_ERR, "acpid socket died\n"); |
| 450 |
} |
| 451 |
continue; |
| 452 |
} |
| 453 |
|
| 439 |
if (!DBus_Server::DBusDied && FD_ISSET(dbus_fd, &temp_fd_set)) { |
454 |
if (!DBus_Server::DBusDied && FD_ISSET(dbus_fd, &temp_fd_set)) { |
| 440 |
pDebug(DBG_INFO, "Handling dbus request on fd: %d", dbus_fd); |
455 |
pDebug(DBG_INFO, "Handling dbus request on fd: %d", dbus_fd); |
| 441 |
if (dbus_server.handleRequest() != 0){ |
456 |
if (dbus_server.handleRequest() != 0){ |
|
Lines 485-506
Link Here
|
| 485 |
} |
500 |
} |
| 486 |
} |
501 |
} |
| 487 |
|
502 |
|
| 488 |
/* ignore ACPI events if we went to sleep or the machine will possibly shutdown |
503 |
pDebug(DBG_DEBUG, "Timeout.\n"); |
| 489 |
because of a pressed power button. Watch out the suspend/standby functions in |
|
|
| 490 |
acpi.cpp where the value for this variable is set to 1*/ |
| 491 |
if ( !acpidDied && FD_ISSET(hwEvent_fd, &temp_fd_set)){ |
| 492 |
pDebug(DBG_DEBUG, "hw FD %d is set, handling it ...\n", hwEvent_fd); |
| 493 |
// acpid socket died ? |
| 494 |
if (handleHWEventRequest() == -2) { |
| 495 |
acpidDied = true; |
| 496 |
close(hwEvent_fd); |
| 497 |
FD_CLR(hwEvent_fd, &fd_set_reading); |
| 498 |
pDebug (DBG_ERR, "acpid socket died\n"); |
| 499 |
} |
| 500 |
continue; |
| 501 |
} |
| 502 |
else |
| 503 |
pDebug(DBG_DEBUG, "Timeout.\n"); |
| 504 |
|
504 |
|
| 505 |
|
505 |
|
| 506 |
|
506 |
|