Example #1
0
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);
}
Example #2
0
void
stopBrailleInput (void) {
  if (brailleInputAlarm) {
    asyncCancelRequest(brailleInputAlarm);
    brailleInputAlarm = NULL;
  }
}
Example #3
0
void
serialDisconnectDevice (SerialDevice *serial) {
  if (serial->package.inputMonitor) {
    asyncCancelRequest(serial->package.inputMonitor);
    serial->package.inputMonitor = NULL;
  }
}
Example #4
0
static void
cancelMissingAcknowledgementAlarm (BrailleDisplay *brl) {
  if (brl->data->missingAcknowledgementAlarm) {
    asyncCancelRequest(brl->data->missingAcknowledgementAlarm);
    brl->data->missingAcknowledgementAlarm = NULL;
  }
}
Example #5
0
static void
stopBlinkDescriptor (BlinkDescriptor *blink) {
    if (blink->alarmHandle) {
        asyncCancelRequest(blink->alarmHandle);
        blink->alarmHandle = NULL;
    }
}
Example #6
0
static void
endUsbProtocol (BrailleDisplay *brl) {
  if (brl->data->proto.usb.statusAlarm) {
    asyncCancelRequest(brl->data->proto.usb.statusAlarm);
    brl->data->proto.usb.statusAlarm = NULL;
  }
}
Example #7
0
static void
stopFreezeReminderAlarm (void) {
  if (freezeReminderAlarm) {
    asyncCancelRequest(freezeReminderAlarm);
    freezeReminderAlarm = NULL;
  }
}
Example #8
0
static void
usbCancelInputMonitor (UsbEndpoint *endpoint) {
  if (endpoint->direction.input.pipe.monitor) {
    asyncCancelRequest(endpoint->direction.input.pipe.monitor);
    endpoint->direction.input.pipe.monitor = NULL;
  }
}
Example #9
0
File: pipe.c Project: mlang/brltty
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;
  }
}
Example #10
0
File: tune.c Project: brltty/brltty
static void
closeTuneDevice (void) {
  if (tuneDeviceCloseTimer) {
    asyncCancelRequest(tuneDeviceCloseTimer);
    tuneDeviceCloseTimer = NULL;
  }

  if (noteDevice) {
    noteMethods->destruct(noteDevice);
    noteDevice = NULL;
  }
}
Example #11
0
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);
}
Example #12
0
static void
cancelActivityStartAlarm (ActivityObject *activity) {
  asyncCancelRequest(activity->startAlarm);
  activity->startAlarm = NULL;
}
Example #13
0
File: pipe.c Project: mlang/brltty
static void
stopInputMonitor (NamedPipeObject *obj) {
  asyncCancelRequest(obj->input.monitor);
  initializeInputMonitor(obj);
}
Example #14
0
void
destroyKeyboardMonitorExtension (KeyboardMonitorExtension *kmx) {
  if (kmx->uevent.monitor) asyncCancelRequest(kmx->uevent.monitor);
  if (kmx->uevent.socket != -1) close(kmx->uevent.socket);
  free(kmx);
}