MCPcopy Create free account
hub / github.com/apache/trafficserver / cmd_mode

Function cmd_mode

src/traffic_server/traffic_server.cc:1294–1315  ·  view source on GitHub ↗

Command mode

Source from the content-addressed store, hash-verified

1292// Command mode
1293//
1294int
1295cmd_mode()
1296{
1297 if (command_index >= 0) {
1298 return commands[command_index].f(command_string);
1299 } else if (*command_string) {
1300 Warning("unrecognized command: '%s'", command_string);
1301 printf("\n");
1302 printf("WARNING: Unrecognized command: '%s'\n", command_string);
1303 printf("\n");
1304 print_cmd_help();
1305 return CMD_FAILED; // in error
1306 } else {
1307 printf("\n");
1308 printf("WARNING\n");
1309 printf("\n");
1310 printf("The interactive command mode no longer exists.\n");
1311 printf("Use '-C <command>' to execute a command from the shell prompt.\n");
1312 printf("For example: 'traffic_server -C clear' will clear the cache.\n");
1313 return 1;
1314 }
1315}
1316
1317#ifdef UNUSED_FUNCTION
1318void

Callers 1

mainFunction · 0.85

Calls 1

print_cmd_helpFunction · 0.85

Tested by

no test coverage detected