MCPcopy Create free account
hub / github.com/OpenVPN/openvpn3-linux / set_console_echo

Function set_console_echo

src/common/utils.cpp:171–184  ·  view source on GitHub ↗

* Enables or disables the terminal input echo flag. This * is used to mask password input. * * @param echo Boolean, if true the console input will be echoed to console */

Source from the content-addressed store, hash-verified

169 * @param echo Boolean, if true the console input will be echoed to console
170 */
171void set_console_echo(bool echo)
172{
173 struct termios console;
174 tcgetattr(STDIN_FILENO, &console);
175 if (echo)
176 {
177 console.c_lflag |= ECHO;
178 }
179 else
180 {
181 console.c_lflag &= ~ECHO;
182 }
183 tcsetattr(STDIN_FILENO, TCSANOW, &console);
184}
185
186
187std::string get_local_tstamp(const std::time_t epoch)

Callers 1

query_user_inputFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected