Commit Graph

284 Commits

Author SHA1 Message Date
Keith Winstein ce47d1f769 Fix bug in retransmission logic (improves performance on lossy links) 2012-05-02 23:55:13 -04:00
Keith Winstein 2ea3f3a347 Warn when server has not heard from us (even if we have heard from server) 2012-04-30 22:43:45 -04:00
Massimo Gengarelli 49fc21c8a3 Catch by const reference (remove Eclipse warnings)
(closes #245)
2012-04-29 02:24:31 -04:00
Keith Winstein 6616d936f6 Revert "Include config.h in base64.cc to get restrict def (may address #241)"
This reverts commit f4c8417672.

config.h was already included via base64.h, and problem is older autoconf.
2012-04-25 12:42:34 -04:00
Keith Winstein f4c8417672 Include config.h in base64.cc to get restrict def (may address #241) 2012-04-25 12:20:53 -04:00
Keith Winstein d5051569b8 COND_THIRD_POLL _overrides_ broken system poll; does not add to it.
Fixes OS X 10.6 problem from 7fe9f29.
2012-04-25 02:22:38 -04:00
Keith Winstein fbb768ca1c Include test_utils.h in "SOURCES" so it is distributed 2012-04-24 19:15:30 -04:00
Keith Winstein 913ee0b34b Conform test to new crypto size limit 2012-04-24 18:53:24 -04:00
Keith Winstein 22e7cf60d3 Keep aligned buffers around, instead of allocing on each packet
Fixes #238 github issue.
Also fixes armel "Bad alignment" problem.
2012-04-24 18:40:01 -04:00
Keith Winstein 63459ed1c7 Revert use of protobuf's Gzip streams.
Unfortunately some Red Hat-based distributions lack the required header.
See https://bugzilla.redhat.com/show_bug.cgi?id=815587

This reverts commit 261a389a76.
This reverts commit b6736eb0a5.
2012-04-23 22:50:49 -04:00
Keith Winstein e7d2bcf642 Update test for elimination of ae_allocate() / ae_free(). 2012-04-22 22:50:09 -04:00
Keith Winstein e8236c5fd4 Use AlignedBuffer stedda posix_memalign(). Should work on PPC OS X 10.5.
Fixes #233 github issue.
2012-04-22 22:46:49 -04:00
Anders Kaseorg b6736eb0a5 Use protobuf’s Gzip{Input,Output}Stream wrapper around zlib
This removes our direct zlib dependency (although of course protobuf
still uses it internally), removes a fixed 4 MiB buffer and its
corresponding limit on the terminal size, reduces some string copying,
and deletes some code.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>

(Closes #230.)
2012-04-22 16:14:28 -04:00
Anders Kaseorg 7fe9f29448 Set poll_LIBS = libpoll.a in Makefile.am so dependency tracking works
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2012-04-21 02:19:36 -04:00
Anders Kaseorg 735dcd6ad5 Clarify COND_THIRD_LIBSTDDJB code
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2012-04-21 02:19:13 -04:00
Keith Winstein 62330a0b09 Put the setsid() where it belongs 2012-04-20 20:38:27 -04:00
Keith Winstein 8de74afb5f Restore 50 fps cap on frame rate (relevant to #222 github issue). 2012-04-19 23:00:12 -04:00
Keith Winstein 3c6e45a469 Adjust timing parameters in response to real-world trace data.
Also increases maximum frame rate from 50 fps to 100 fps.

Relevant to issue #222 on github.
2012-04-19 22:40:03 -04:00
Keith Winstein b9a8b8c009 More helpful messages when locale not found or wrong (closes #209) 2012-04-19 02:35:14 -04:00
Keith Winstein 58589787ea Make compressor take string references (closes #214 github issue) 2012-04-19 01:35:15 -04:00
Keith Winstein 24d48f37a4 Don't try to predict scroll until we have versioned cell predictions.
Closes #6
2012-04-19 01:11:16 -04:00
Keith Winstein 1508d40b4c Chdir to homedir (closes #193) and honor .hushlogin (closes #216). 2012-04-19 01:03:25 -04:00
Keith Winstein b127a92617 Back off overlay frame rate when all timing tests have fired (saves CPU)
Closes #225 github issue (Jay Freeman).
2012-04-19 00:07:51 -04:00
Keith Winstein 9cf87d224e Verbose server now turns on verbose transport layer (much more output)
Relevant to #217.
2012-04-18 10:47:18 -04:00
Keegan McAllister a289a2319e Preserve RLIMIT_CORE hard limit, and restore soft limit before exec
Closes #196.
2012-04-16 20:03:04 -04:00
Keith Winstein 3ed9c0fb77 Only print motd for login shells, not when command is specified. 2012-04-16 18:34:53 -04:00
Keith Winstein c8951c7dfd Use memmove() where ranges may overlap. Fixes #200 (Matthew Dempsky). 2012-04-16 18:22:27 -04:00
Keith Winstein 68825dccde Print /etc/motd before login shell. Closes #190. 2012-04-16 18:19:45 -04:00
Keith Winstein b4263b354e Check for paths.h and make sure we have _PATH_BSHELL 2012-04-16 17:51:52 -04:00
Jay Freeman (saurik) 2462434390 Use _PATH_BSHELL for "/bin/sh" and fix argv[0].
The previous code had the following issues:

1) hardcoded the path of /bin/sh (should use paths.h)
2) threw away the variable with the fallback shell
3) prepended - to the path rather than the shell name
4) added a - before explicit chosen non-shell commands

Closes #199.
2012-04-16 17:40:30 -04:00
Keith Winstein bfa0999089 Final tab-related bugfix (of the morning). Now matches xterm more closely. 2012-04-16 11:31:37 -04:00
Keith Winstein 0293e579d2 Properly reset tab stops on resize 2012-04-16 09:55:59 -04:00
Keegan McAllister c390ee9b80 Hardcode the terminals which accept "set window title"
terminfo does not have reliable information on this, so we hardcode a whitelist
of terminal type prefixes.  This is the list from Debian's default screenrc,
plus "screen" itself (which also covers tmux).

Closes #172.
Closes #191.
2012-04-16 09:23:30 -04:00
Keith Winstein feb352c809 Optional verifier for round-trippability, and fix wrapping and tab bugs. 2012-04-16 09:09:20 -04:00
Keith Winstein bcb96d9337 Change some asserts flagging runtime errors to fatal_asserts (Anders Kaseorg) 2012-04-16 06:27:14 -04:00
Keith Winstein a8c3df9c80 More robust shutdown sequence with warning on unclean shutdown. 2012-04-16 06:22:35 -04:00
Keith Winstein 79542106c1 Make still_connecting() false if network not initialized, to fix confusing error msg. 2012-04-16 03:51:30 -04:00
Keegan McAllister c8fe5a3999 mosh-client: Return true for still_connecting if !network
Fixes:

    $ MOSH_KEY=foo ./mosh-client 127.0.0.1 60010
    Crypto exception: Key must be 22 letters long.
    Segmentation fault

Closes #189.
2012-04-16 03:46:09 -04:00
Keith Winstein c15d3d0c48 Use "ANSI-mode" cursor keys only on actual cursor keys (A through D).
Fixes #161.
2012-04-16 03:44:07 -04:00
Keith Winstein cca925e020 Reset prediction engine after size has changed (i.e. after Resize is applied) 2012-04-16 03:06:11 -04:00
Keith Winstein 119bbcaced Add nicer message and 15s timeout if server can't be reached on UDP.
(Closes #152)
2012-04-16 02:31:27 -04:00
Ed Schouten 033953dcd2 Don't leak utmpx entries on shutdown.
As far as I know, for all implementations of libutempter, the
utempter_remove_added_record() function depends on the file descriptor
passed to utempter_add_record() to still be valid. The reason for this,
is that this file descriptor is propagated to the setuid utility that is
responsible for modifying utmpx.

Modify the code to remove the utmpx entry before closing the
pseudo-terminal master device. While there, simply use
utempter_remove_record(), which takes the file descriptor explicitly.
The advantage is that this prevents potential foot-shooting in the
future. Visual inspection of the source code will make it more obvious
that utempter depends on the file descriptor.

Closes #179.
2012-04-16 01:37:48 -04:00
Keegan McAllister c2a5941f88 Fall back to naive built-in byte-swap routines
EL5 lacks htobe64 and friends.  Using its byteswap.h requires an endianness
check in our headers, which is fragile and compiler-dependent.  It's a fair
amount of code [1], and is only useful on EL5.

So instead, let's include a fallback implementation of these functions, and use
it whenever we can't find the (now-)standard Linux or OS X routines.  The
fallback is endianness-independent and should work on any platform.

[1] https://github.com/rurban/mosh/commit/da1a5abd1e09f0c1e9295357bb480a643d9dc8e3
2012-04-15 23:42:15 -04:00
Keith Winstein 99e8626a01 Tidy check for exception in Network::Connection::send(). 2012-04-15 23:29:05 -04:00
Keith Winstein 7103c5f48b Using fclose() instead of close() means future fprintf() doesn't kill us on Mac. 2012-04-15 23:25:21 -04:00
Keith Winstein f376b80018 Fix protobuf -I lines to build with non-system protobuf 2012-04-15 23:20:10 -04:00
Keith Winstein aca69ef684 Server does not need to raise exception on failed sendto(). Fixes #183. 2012-04-15 23:13:58 -04:00
Keith Winstein 6b6747cda7 Fix valgrind error with 1-col char then 2-col char in a 1x1 terminal 2012-04-15 17:11:40 -04:00
Keegan McAllister cd2d482484 Don't use *_t for our own typedefs
It's reserved by POSIX.

(closes #158 pull request)
2012-04-15 13:50:18 -04:00
Keegan McAllister 280400152d Replace one find_if with a loop
g++/libstdc++ 4.1.2 is unhappy with this use of bind2nd, possibly because the
argument is a reference.  This is a problem for EL5.
2012-04-15 13:49:15 -04:00