| 8019 | dist_sleep_reconnect(); |
| 8020 | } |
| 8021 | } |
| 8022 | |
| 8023 | /* ========================================================================= |
| 8024 | * CLI Option Parsing And Public Entrypoint |
| 8025 | * ========================================================================= */ |
| 8026 | |
| 8027 | static bool dist_parse_role(const char *s, ds4_distributed_role *out) { |
| 8028 | if (!s || !out) return false; |
| 8029 | if (!strcmp(s, "none")) { |
| 8030 | *out = DS4_DISTRIBUTED_NONE; |
| 8031 | return true; |
| 8032 | } |
| 8033 | if (!strcmp(s, "coordinator")) { |
| 8034 | *out = DS4_DISTRIBUTED_COORDINATOR; |
| 8035 | return true; |
| 8036 | } |
| 8037 | if (!strcmp(s, "worker")) { |