MCPcopy Create free account
hub / github.com/DeNA/HandlerSocket-Plugin-for-MySQL / parse_args

Function parse_args

libhsclient/config.cpp:47–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45}
46
47void
48parse_args(int argc, char **argv, config& conf)
49{
50 for (int i = 1; i < argc; ++i) {
51 const char *const arg = argv[i];
52 const char *const eq = strchr(arg, '=');
53 if (eq == 0) {
54 continue;
55 }
56 const std::string key(arg, eq - arg);
57 const std::string val(eq + 1);
58 conf[key] = val;
59 }
60 config::const_iterator iter = conf.find("verbose");
61 if (iter != conf.end()) {
62 verbose_level = atoi(iter->second.c_str());
63 }
64}
65
66};
67

Callers 3

hstcpcli_mainFunction · 0.85
hs_longrun_mainFunction · 0.85
hstest_mainFunction · 0.85

Calls 1

endMethod · 0.45

Tested by 1

hstest_mainFunction · 0.68