Revision 3811693d
Renamed tool_get_user to tool_read_user
mainbox/tool.c | ||
---|---|---|
40 | 40 |
tool->state = TS_OFF; |
41 | 41 |
} |
42 | 42 |
|
43 |
static void tool_get_user(struct tool_t *tool) {
|
|
43 |
static void tool_read_user(struct tool_t *tool) {
|
|
44 | 44 |
unsigned short serno[2]; |
45 | 45 |
if (modbus_read_registers(ctx, MB_INP_SERNOL, 2, serno) == -1) { |
46 | 46 |
fprintf(stderr, "modbus_read_registers: %s\n", modbus_strerror(errno)); |
... | ... | |
89 | 89 |
|
90 | 90 |
case TS_OFF: |
91 | 91 |
if (status[MB_COIL_NEW]) { |
92 |
tool_get_user(tool);
|
|
92 |
tool_read_user(tool);
|
|
93 | 93 |
// TODO check actual credentials |
94 | 94 |
if (rand() & 1) { |
95 | 95 |
tool_grant_access(tool); |
Also available in: Unified diff