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

Function process_set_local

cdb2api/cdb2api.c:4091–4116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4089}
4090
4091static void process_set_local(cdb2_hndl_tp *hndl, const char *set_command)
4092{
4093 const char *p = &set_command[sizeof("SET") - 1];
4094
4095 p = cdb2_skipws(p);
4096
4097 if (strncasecmp(p, "hasql", 5) == 0) {
4098 p += sizeof("HASQL");
4099 p = cdb2_skipws(p);
4100 if (strncasecmp(p, "on", 2) == 0)
4101 hndl->is_hasql = 1;
4102 else
4103 hndl->is_hasql = 0;
4104 return;
4105 }
4106
4107 if (strncasecmp(p, "admin", 5) == 0) {
4108 p += sizeof("ADMIN");
4109 p = cdb2_skipws(p);
4110 if (strncasecmp(p, "on", 2) == 0)
4111 hndl->is_admin = 1;
4112 else
4113 hndl->is_admin = 0;
4114 return;
4115 }
4116}
4117
4118/*
4119 * 0 - Processed an SSL set

Callers 1

process_set_commandFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected