Lines Matching refs:command
165 void write_bad_command_error(int conn_socket, char* command) { in write_bad_command_error() argument
166 int num = snprintf(tmp_write_buffer, PARSE_BUF_LEN, "Bad command received: %s", command); in write_bad_command_error()
519 char* command = strtok(buffer, " "); in get_command() local
520 char* newline = strchr(command, '\n'); in get_command()
524 return command; in get_command()
543 char* command = strtok(buffer, " \r\n"); in parse_socket_data() local
544 if (command == NULL) { in parse_socket_data()
545 write_bad_command_error(conn_socket, command); in parse_socket_data()
546 } else if (strncmp(command, COMMAND_LS, 2) == 0) { in parse_socket_data()
548 } else if (strcmp(command, COMMAND_RECOGNITION_TRIGGER) == 0) { in parse_socket_data()
550 } else if (strcmp(command, COMMAND_RECOGNITION_ABORT) == 0) { in parse_socket_data()
552 } else if (strcmp(command, COMMAND_RECOGNITION_FAILURE) == 0) { in parse_socket_data()
554 } else if (strcmp(command, COMMAND_UPDATE) == 0) { in parse_socket_data()
556 } else if (strncmp(command, COMMAND_CLEAR, 5) == 0) { in parse_socket_data()
558 } else if (strncmp(command, COMMAND_CLOSE, 5) == 0) { in parse_socket_data()
562 } else if (strncmp(command, COMMAND_END, 3) == 0) { in parse_socket_data()
568 write_vastr(conn_socket, "\nBad command %s.\n\n", command); in parse_socket_data()