Changeset 3621 in MondoRescue for branches/3.3/mindi-busybox/networking/telnet.c
- Timestamp:
- Dec 20, 2016, 4:07:32 PM (7 years ago)
- Location:
- branches/3.3
- Files:
-
- 1 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/3.3/mindi-busybox/networking/telnet.c
r3232 r3621 40 40 #include <netinet/in.h> 41 41 #include "libbb.h" 42 #include "common_bufsiz.h" 42 43 43 44 #ifdef __BIONIC__ … … 109 110 struct termios termios_raw; 110 111 } FIX_ALIASING; 111 #define G (*(struct globals*) &bb_common_bufsiz1)112 #define G (*(struct globals*)bb_common_bufsiz1) 112 113 #define INIT_G() do { \ 113 struct G_sizecheck { \ 114 char G_sizecheck[sizeof(G) > COMMON_BUFSIZE ? -1 : 1]; \ 115 }; \ 114 setup_common_bufsiz(); \ 115 BUILD_BUG_ON(sizeof(G) > COMMON_BUFSIZE); \ 116 116 } while (0) 117 117 … … 126 126 static void iac_flush(void) 127 127 { 128 write(netfd, G.iacbuf, G.iaclen);128 full_write(netfd, G.iacbuf, G.iaclen); 129 129 G.iaclen = 0; 130 130 } 131 132 #define write_str(fd, str) write(fd, str, sizeof(str) - 1)133 131 134 132 static void doexit(int ev) NORETURN; … … 146 144 rawmode(); 147 145 148 write_str(1,"\r\nConsole escape. Commands are:\r\n\n"146 full_write1_str("\r\nConsole escape. Commands are:\r\n\n" 149 147 " l go to line mode\r\n" 150 148 " c go to character mode\r\n" … … 177 175 } 178 176 179 write_str(1,"continuing...\r\n");177 full_write1_str("continuing...\r\n"); 180 178 181 179 if (bb_got_signal) … … 384 382 put_iac(c); 385 383 386 put_iac((x >> 8) & 0xff); 387 put_iac(x & 0xff); 388 put_iac((y >> 8) & 0xff); 389 put_iac(y & 0xff); 384 /* "... & 0xff" implicitly done below */ 385 put_iac(x >> 8); 386 put_iac(x); 387 put_iac(y >> 8); 388 put_iac(y); 390 389 391 390 put_iac(IAC); … … 625 624 xmove_fd(create_and_connect_stream_or_die(host, port), netfd); 626 625 627 setsockopt (netfd, SOL_SOCKET, SO_KEEPALIVE, &const_int_1, sizeof(const_int_1));626 setsockopt_keepalive(netfd); 628 627 629 628 signal(SIGINT, record_signo);
Note:
See TracChangeset
for help on using the changeset viewer.