Changeset 3806317 in mainline for uspace/srv/hid/remcons/remcons.c
- Timestamp:
- 2012-01-10T14:51:09Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 7c2bb2c
- Parents:
- 6f7cd5d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/remcons/remcons.c
r6f7cd5d r3806317 54 54 #include <io/console.h> 55 55 #include <inttypes.h> 56 #include "telnet.h" 56 57 57 58 … … 83 84 static FIBRIL_MUTEX_INITIALIZE(clients_guard); 84 85 static LIST_INITIALIZE(clients); 86 87 /** Telnet commands to force character mode 88 * (redundant to be on the safe side). 89 * See 90 * http://stackoverflow.com/questions/273261/force-telnet-client-into-character-mode 91 * for discussion. 92 */ 93 static const telnet_cmd_t telnet_force_character_mode_command[] = { 94 TELNET_IAC, TELNET_WILL, TELNET_ECHO, 95 TELNET_IAC, TELNET_WILL, TELNET_SUPPRESS_GO_AHEAD, 96 TELNET_IAC, TELNET_WONT, TELNET_LINEMODE 97 }; 98 static const size_t telnet_force_character_mode_command_count = 99 sizeof(telnet_force_character_mode_command) / sizeof(telnet_cmd_t); 85 100 86 101 static client_t *client_create(int socket) … … 308 323 fibril_mutex_unlock(&client->refcount_mutex); 309 324 310 /* 311 * Force character mode. 312 * IAC WILL ECHO IAC WILL SUPPRESS_GO_AHEAD IAC WONT LINEMODE 313 * http://stackoverflow.com/questions/273261/force-telnet-client-into-character-mode 314 */ 315 const char force_char_mode[] = {255, 251, 1, 255, 251, 3, 255, 252, 34}; 316 send(client->socket, (void *)force_char_mode, sizeof(force_char_mode), 0); 325 /* Force character mode. */ 326 send(client->socket, (void *)telnet_force_character_mode_command, 327 telnet_force_character_mode_command_count, 0); 317 328 318 329 client_connection_message_loop(client);
Note:
See TracChangeset
for help on using the changeset viewer.