MCPcopy Create free account
hub / github.com/antirez/ds4 / parse_backend

Function parse_backend

ds4_cli.c:165–180  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

163 return 1;
164 }
165
166 const char *why = err[0] ? err : "route incomplete";
167 if (strcmp(last, why) != 0 || (ticks % 20u) == 0) {
168 fprintf(stderr, "ds4: waiting for distributed route: %s\n", why);
169 snprintf(last, sizeof(last), "%s", why);
170 }
171 nanosleep(&delay, NULL);
172 ticks++;
173 }
174}
175
176static void usage(FILE *fp, const char *topic) {
177 ds4_help_print(fp, DS4_HELP_DS4, topic);
178}
179
180static int parse_int(const char *s, const char *opt) {
181 char *end = NULL;
182 long v = strtol(s, &end, 10);
183 if (s[0] == '\0' || *end != '\0' || v <= 0 || v > INT32_MAX) {

Callers 1

parse_optionsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected