MCPcopy Create free account
hub / github.com/bloomberg/comdb2 / dbtype_valid

Function dbtype_valid

tools/cdb2sql/cdb2sql.cpp:1926–1943  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1924}
1925
1926static 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
1945void send_cancel_cnonce(const char *cnonce)
1946{

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected