diff --git a/configure.ac b/configure.ac index a146e22..948cb35 100644 --- a/configure.ac +++ b/configure.ac @@ -40,7 +40,7 @@ AC_FUNC_REALLOC AC_CHECK_FUNCS([clock_gettime gettimeofday inet_ntoa iswprint memchr memset nl_langinfo setenv setlocale socket strchr strdup strerror strtol wcwidth]) # Checks for protobuf -PKG_CHECK_MODULES([protobuf_lite], [protobuf-lite]) +PKG_CHECK_MODULES([protobuf], [protobuf]) AC_CONFIG_FILES([Makefile src/Makefile src/crypto/Makefile src/frontend/Makefile src/network/Makefile src/protobufs/Makefile src/statesync/Makefile src/terminal/Makefile src/util/Makefile scripts/Makefile src/examples/Makefile man/Makefile]) AC_OUTPUT diff --git a/debian/changelog b/debian/changelog index defbd4d..dcaf4c2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +mosh (0.94c-1) unstable; urgency=low + + * Move to protobuf (from protobuf-lite) to make build on Ubuntu 10.04 + + -- Keith Winstein Mon, 20 Feb 2012 00:39:12 -0500 + mosh (0.94b-1) unstable; urgency=low * Relax autoconf dependency diff --git a/debian/control b/debian/control index fbb97be..9859264 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,7 @@ Source: mosh Section: net Priority: optional Maintainer: Keith Winstein -Build-Depends: debhelper (>= 7.0.0), autotools-dev, protobuf-compiler, libprotobuf-dev, dh-autoreconf, pkg-config, libutempter-dev, libboost-dev +Build-Depends: debhelper (>= 7.0.0), autotools-dev, protobuf-compiler, libprotobuf-dev, dh-autoreconf, pkg-config, libutempter-dev, libboost-dev, zlib1g-dev Standards-Version: 3.9.2 Homepage: http://mosh.mit.edu Vcs-Git: git://github.com/keithw/mosh.git diff --git a/src/examples/Makefile.am b/src/examples/Makefile.am index c88e4b6..a0a2e1b 100644 --- a/src/examples/Makefile.am +++ b/src/examples/Makefile.am @@ -2,7 +2,7 @@ AM_CXXFLAGS = -pedantic -Wno-long-long -Werror -Wall -Wextra -Weffc++ -fno-defau noinst_PROGRAMS = encrypt decrypt ntester parse termemu -LIBS = $(protobuf_lite_LIBS) +LIBS = $(protobuf_LIBS) encrypt_SOURCES = encrypt.cc encrypt_CPPFLAGS = -I$(srcdir)/../crypto diff --git a/src/frontend/Makefile.am b/src/frontend/Makefile.am index ada7508..30653d7 100644 --- a/src/frontend/Makefile.am +++ b/src/frontend/Makefile.am @@ -1,6 +1,6 @@ AM_CPPFLAGS = -I$(srcdir)/../statesync -I$(srcdir)/../terminal -I$(srcdir)/../network -I$(srcdir)/../crypto -I$(builddir)/../protobufs -I$(srcdir)/../util AM_CXXFLAGS = -pedantic -Wno-long-long -Werror -Wall -Wextra -Weffc++ -fno-default-inline -pipe -LIBS = $(protobuf_lite_LIBS) +LIBS = $(protobuf_LIBS) LDADD = ../crypto/libmoshcrypto.a ../network/libmoshnetwork.a ../statesync/libmoshstatesync.a ../terminal/libmoshterminal.a ../util/libmoshutil.a ../protobufs/libmoshprotos.a -lutil -lrt -lm -lutempter bin_PROGRAMS = mosh-client mosh-server diff --git a/src/network/network.cc b/src/network/network.cc index ea7dabb..990172f 100644 --- a/src/network/network.cc +++ b/src/network/network.cc @@ -191,10 +191,7 @@ void Connection::send( string s ) ssize_t bytes_sent = sendto( sock, p.data(), p.size(), 0, (sockaddr *)&remote_addr, sizeof( remote_addr ) ); - if ( (bytes_sent < 0) && (errno == EMSGSIZE) ) { - update_MTU(); - throw NetworkException( "Path MTU Discovery", EMSGSIZE ); - } else if ( bytes_sent == static_cast( p.size() ) ) { + if ( bytes_sent == static_cast( p.size() ) ) { return; } else { throw NetworkException( "sendto", errno ); @@ -349,30 +346,3 @@ public: } } }; - -void Connection::update_MTU( void ) -{ - if ( !attached ) { - return; - } - - /* We don't want to use our main socket because we don't want to have to connect it */ - Socket path_MTU_socket( AF_INET, SOCK_DGRAM, 0 ); - - /* Connect socket so we can retrieve path MTU */ - if ( connect( path_MTU_socket.fd, (sockaddr *)&remote_addr, sizeof( remote_addr ) ) < 0 ) { - throw NetworkException( "connect", errno ); - } - - int PMTU; - socklen_t optlen = sizeof( PMTU ); - if ( getsockopt( path_MTU_socket.fd, IPPROTO_IP, IP_MTU, &PMTU, &optlen ) < 0 ) { - throw NetworkException( "getsockopt", errno ); - } - - if ( optlen != sizeof( PMTU ) ) { - throw NetworkException( "Error getting path MTU", errno ); - } - - MTU = min( PMTU, int(SEND_MTU) ); /* need cast to compile without optimization! XXX */ -} diff --git a/src/network/network.h b/src/network/network.h index 87500a4..1a226f8 100644 --- a/src/network/network.h +++ b/src/network/network.h @@ -99,8 +99,6 @@ namespace Network { Packet new_packet( string &s_payload ); - void update_MTU( void ); - public: Connection( const char *desired_ip ); /* server */ Connection( const char *key_str, const char *ip, int port ); /* client */ diff --git a/src/protobufs/Makefile.am b/src/protobufs/Makefile.am index 2897547..e65813c 100644 --- a/src/protobufs/Makefile.am +++ b/src/protobufs/Makefile.am @@ -1,8 +1,8 @@ source = userinput.proto hostinput.proto transportinstruction.proto PROTOC = protoc -AM_CPPFLAGS = $(protobuf_lite_CFLAGS) -AM_CXXFLAGS = -pedantic -Wno-long-long -Werror -Wall -Wextra -fno-default-inline -pipe +AM_CPPFLAGS = $(protobuf_CFLAGS) +AM_CXXFLAGS = -pedantic -Wno-long-long -Werror -Wall -fno-default-inline -pipe SUFFIXES = .proto .pb.cc