| 1924 | } |
| 1925 | |
| 1926 | static inline int dbtype_valid(char *type) |
| 1927 | { |
| 1928 | static const char *dbtypes[] = {"default", "local", "dev", |
| 1929 | "restore", "fuzz", "alpha", |
| 1930 | "beta", "uat", "prod"}; |
| 1931 | |
| 1932 | if (type) { |
| 1933 | if (type[0] == '@') // @host[:port] |
| 1934 | return 1; |
| 1935 | else |
| 1936 | for (size_t i = 0, len = sizeof(dbtypes) / sizeof(dbtypes[0]); |
| 1937 | i != len; ++i) |
| 1938 | if (strcasecmp(type, dbtypes[i]) == 0) |
| 1939 | return 1; |
| 1940 | } |
| 1941 | |
| 1942 | return 0; |
| 1943 | } |
| 1944 | |
| 1945 | void send_cancel_cnonce(const char *cnonce) |
| 1946 | { |