38 const char *message = reason;
42 char *endofflags = strstr(m,
"]");
45 if (m[0] ==
'[' && endofflags)
47 message = strstr(reason,
"]") + 1;
50 const char *token = strtok(m,
"[,");
53 if (!strncmp(token,
"backoff ", strlen(
"backoff ")))
57 msg(
D_PUSH,
"invalid AUTH_FAIL,TEMP flag: %s", token);
61 else if (!strncmp(token,
"advance ", strlen(
"advance ")))
63 token += strlen(
"advance ");
64 if (!strcmp(token,
"no"))
68 else if (!strcmp(token,
"remote"))
73 else if (!strcmp(token,
"addr"))
83 token = strtok(NULL,
"[,");
89 if (!message || message[0] !=
':')
106 long long i = strtoll(str, &endptr, 10);
108 if (i < INT_MIN || (positive && i < 0) || *endptr !=
'\0' || i > INT_MAX)
122 long long i = strtoll(str, &endptr, 10);
124 if (i < 0 || *endptr != '\0' || i > INT_MAX)
126 msg(msglevel,
"Cannot parse argument '%s' as non-negative integer",
138 long long i = strtoll(str, &endptr, 10);
140 if (i < INT_MIN || *endptr != '\0' || i > INT_MAX)
142 msg(msglevel,
"Cannot parse argument '%s' as integer", str);