MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / fxCloseNetwork

Function fxCloseNetwork

tools/serial2xsbug/serial2xsbug_lin.c:45–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43#define TCSETS2 _IOW('T', 0x2B, struct termios2)
44
45void fxCloseNetwork(txSerialTool self, uint32_t value)
46{
47 txSerialMachine* link = &(self->firstMachine);
48 txSerialMachine machine;
49 while ((machine = *link)) {
50 if ((machine->value == value) || (0 == value)) {
51 *link = machine->nextMachine;
52 if (self->currentMachine == machine)
53 self->currentMachine = NULL;
54 if (machine->networkConnection >= 0)
55 close(machine->networkConnection);
56 free(machine);
57 }
58 else
59 link = &(machine->nextMachine);
60 }
61 fxCountMachines(self);
62}
63
64void fxCloseSerial(txSerialTool self)
65{

Callers

nothing calls this directly

Calls 2

fxCountMachinesFunction · 0.70
closeFunction · 0.50

Tested by

no test coverage detected