Ignore:
Timestamp:
Dec 20, 2016, 4:07:32 PM (7 years ago)
Author:
Bruno Cornec
Message:

New 3?3 banch for incorporation of latest busybox 1.25. Changing minor version to handle potential incompatibilities.

Location:
branches/3.3
Files:
1 edited
1 copied

Legend:

Unmodified
Added
Removed
  • branches/3.3/mindi-busybox/networking/telnet.c

    r3232 r3621  
    4040#include <netinet/in.h>
    4141#include "libbb.h"
     42#include "common_bufsiz.h"
    4243
    4344#ifdef __BIONIC__
     
    109110    struct termios termios_raw;
    110111} FIX_ALIASING;
    111 #define G (*(struct globals*)&bb_common_bufsiz1)
     112#define G (*(struct globals*)bb_common_bufsiz1)
    112113#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); \
    116116} while (0)
    117117
     
    126126static void iac_flush(void)
    127127{
    128     write(netfd, G.iacbuf, G.iaclen);
     128    full_write(netfd, G.iacbuf, G.iaclen);
    129129    G.iaclen = 0;
    130130}
    131 
    132 #define write_str(fd, str) write(fd, str, sizeof(str) - 1)
    133131
    134132static void doexit(int ev) NORETURN;
     
    146144        rawmode();
    147145
    148     write_str(1, "\r\nConsole escape. Commands are:\r\n\n"
     146    full_write1_str("\r\nConsole escape. Commands are:\r\n\n"
    149147            " l go to line mode\r\n"
    150148            " c go to character mode\r\n"
     
    177175    }
    178176
    179     write_str(1, "continuing...\r\n");
     177    full_write1_str("continuing...\r\n");
    180178
    181179    if (bb_got_signal)
     
    384382    put_iac(c);
    385383
    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);
    390389
    391390    put_iac(IAC);
     
    625624    xmove_fd(create_and_connect_stream_or_die(host, port), netfd);
    626625
    627     setsockopt(netfd, SOL_SOCKET, SO_KEEPALIVE, &const_int_1, sizeof(const_int_1));
     626    setsockopt_keepalive(netfd);
    628627
    629628    signal(SIGINT, record_signo);
Note: See TracChangeset for help on using the changeset viewer.