void destroyKeyboardInstanceExtension (KeyboardInstanceExtension *kix) { if (kix->file.monitor) { asyncCancelRequest(kix->file.monitor); logMessage(LOG_DEBUG, "closing keyboard: %s: fd=%d", kix->device.path, kix->file.descriptor); } if (kix->file.descriptor != -1) close(kix->file.descriptor); if (kix->udevDelay) asyncCancelRequest(kix->udevDelay); if (kix->uinput) destroyUinputObject(kix->uinput); if (kix->device.path) free(kix->device.path); free(kix); }
void stopBrailleInput (void) { if (brailleInputAlarm) { asyncCancelRequest(brailleInputAlarm); brailleInputAlarm = NULL; } }
void serialDisconnectDevice (SerialDevice *serial) { if (serial->package.inputMonitor) { asyncCancelRequest(serial->package.inputMonitor); serial->package.inputMonitor = NULL; } }
static void cancelMissingAcknowledgementAlarm (BrailleDisplay *brl) { if (brl->data->missingAcknowledgementAlarm) { asyncCancelRequest(brl->data->missingAcknowledgementAlarm); brl->data->missingAcknowledgementAlarm = NULL; } }
static void stopBlinkDescriptor (BlinkDescriptor *blink) { if (blink->alarmHandle) { asyncCancelRequest(blink->alarmHandle); blink->alarmHandle = NULL; } }
static void endUsbProtocol (BrailleDisplay *brl) { if (brl->data->proto.usb.statusAlarm) { asyncCancelRequest(brl->data->proto.usb.statusAlarm); brl->data->proto.usb.statusAlarm = NULL; } }
static void stopFreezeReminderAlarm (void) { if (freezeReminderAlarm) { asyncCancelRequest(freezeReminderAlarm); freezeReminderAlarm = NULL; } }
static void usbCancelInputMonitor (UsbEndpoint *endpoint) { if (endpoint->direction.input.pipe.monitor) { asyncCancelRequest(endpoint->direction.input.pipe.monitor); endpoint->direction.input.pipe.monitor = NULL; } }
static void releaseWindowsResources (NamedPipeObject *obj) { if (obj->windows.connect.monitor) { asyncCancelRequest(obj->windows.connect.monitor); obj->windows.connect.monitor = NULL; } if (obj->windows.connect.event) { CloseHandle(obj->windows.connect.event); obj->windows.connect.event = NULL; } }
static void closeTuneDevice (void) { if (tuneDeviceCloseTimer) { asyncCancelRequest(tuneDeviceCloseTimer); tuneDeviceCloseTimer = NULL; } if (noteDevice) { noteMethods->destruct(noteDevice); noteDevice = NULL; } }
static void usbDeallocateEndpoint (void *item, void *data) { UsbEndpoint *endpoint = item; switch (USB_ENDPOINT_DIRECTION(endpoint->descriptor)) { case UsbEndpointDirection_Input: if (endpoint->direction.input.pending.alarm) { asyncCancelRequest(endpoint->direction.input.pending.alarm); endpoint->direction.input.pending.alarm = NULL; } if (endpoint->direction.input.pending.requests) { deallocateQueue(endpoint->direction.input.pending.requests); endpoint->direction.input.pending.requests = NULL; } if (endpoint->direction.input.completed.request) { free(endpoint->direction.input.completed.request); endpoint->direction.input.completed.request = NULL; } break; default: break; } if (endpoint->extension) { usbDeallocateEndpointExtension(endpoint->extension); endpoint->extension = NULL; } switch (USB_ENDPOINT_DIRECTION(endpoint->descriptor)) { case UsbEndpointDirection_Input: usbDestroyInputPipe(endpoint); break; default: break; } free(endpoint); }
static void cancelActivityStartAlarm (ActivityObject *activity) { asyncCancelRequest(activity->startAlarm); activity->startAlarm = NULL; }
static void stopInputMonitor (NamedPipeObject *obj) { asyncCancelRequest(obj->input.monitor); initializeInputMonitor(obj); }
void destroyKeyboardMonitorExtension (KeyboardMonitorExtension *kmx) { if (kmx->uevent.monitor) asyncCancelRequest(kmx->uevent.monitor); if (kmx->uevent.socket != -1) close(kmx->uevent.socket); free(kmx); }