| 35 | static void fxUnregisterSerial(void *refCon, io_service_t service, natural_t messageType, void *messageArgument); |
| 36 | |
| 37 | void fxCloseNetwork(txSerialTool self, uint32_t value) |
| 38 | { |
| 39 | txSerialMachine* link = &(self->firstMachine); |
| 40 | txSerialMachine machine; |
| 41 | while ((machine = *link)) { |
| 42 | if ((machine->value == value) || (0 == value)) { |
| 43 | *link = machine->nextMachine; |
| 44 | if (self->currentMachine == machine) |
| 45 | self->currentMachine = NULL; |
| 46 | if (machine->networkSource) { |
| 47 | CFRunLoopRemoveSource(CFRunLoopGetCurrent(), machine->networkSource, kCFRunLoopCommonModes); |
| 48 | CFRelease(machine->networkSource); |
| 49 | } |
| 50 | if (machine->networkSocket) { |
| 51 | CFSocketInvalidate(machine->networkSocket); |
| 52 | CFRelease(machine->networkSocket); |
| 53 | } |
| 54 | free(machine); |
| 55 | } |
| 56 | else |
| 57 | link = &(machine->nextMachine); |
| 58 | } |
| 59 | } |
| 60 | |
| 61 | void fxCloseSerial(txSerialTool self) |
| 62 | { |
no outgoing calls
no test coverage detected