Move from protobuf-lite to protobuf to accommodate Ubuntu lucid
Add changelog entry
This commit is contained in:
+1
-1
@@ -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])
|
AC_CHECK_FUNCS([clock_gettime gettimeofday inet_ntoa iswprint memchr memset nl_langinfo setenv setlocale socket strchr strdup strerror strtol wcwidth])
|
||||||
|
|
||||||
# Checks for protobuf
|
# 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_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
|
AC_OUTPUT
|
||||||
|
|||||||
Vendored
+6
@@ -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 <keithw@mit.edu> Mon, 20 Feb 2012 00:39:12 -0500
|
||||||
|
|
||||||
mosh (0.94b-1) unstable; urgency=low
|
mosh (0.94b-1) unstable; urgency=low
|
||||||
|
|
||||||
* Relax autoconf dependency
|
* Relax autoconf dependency
|
||||||
|
|||||||
Vendored
+1
-1
@@ -2,7 +2,7 @@ Source: mosh
|
|||||||
Section: net
|
Section: net
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Maintainer: Keith Winstein <keithw@mit.edu>
|
Maintainer: Keith Winstein <keithw@mit.edu>
|
||||||
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
|
Standards-Version: 3.9.2
|
||||||
Homepage: http://mosh.mit.edu
|
Homepage: http://mosh.mit.edu
|
||||||
Vcs-Git: git://github.com/keithw/mosh.git
|
Vcs-Git: git://github.com/keithw/mosh.git
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ AM_CXXFLAGS = -pedantic -Wno-long-long -Werror -Wall -Wextra -Weffc++ -fno-defau
|
|||||||
|
|
||||||
noinst_PROGRAMS = encrypt decrypt ntester parse termemu
|
noinst_PROGRAMS = encrypt decrypt ntester parse termemu
|
||||||
|
|
||||||
LIBS = $(protobuf_lite_LIBS)
|
LIBS = $(protobuf_LIBS)
|
||||||
|
|
||||||
encrypt_SOURCES = encrypt.cc
|
encrypt_SOURCES = encrypt.cc
|
||||||
encrypt_CPPFLAGS = -I$(srcdir)/../crypto
|
encrypt_CPPFLAGS = -I$(srcdir)/../crypto
|
||||||
|
|||||||
@@ -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_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
|
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
|
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
|
bin_PROGRAMS = mosh-client mosh-server
|
||||||
|
|||||||
+1
-31
@@ -191,10 +191,7 @@ void Connection::send( string s )
|
|||||||
ssize_t bytes_sent = sendto( sock, p.data(), p.size(), 0,
|
ssize_t bytes_sent = sendto( sock, p.data(), p.size(), 0,
|
||||||
(sockaddr *)&remote_addr, sizeof( remote_addr ) );
|
(sockaddr *)&remote_addr, sizeof( remote_addr ) );
|
||||||
|
|
||||||
if ( (bytes_sent < 0) && (errno == EMSGSIZE) ) {
|
if ( bytes_sent == static_cast<ssize_t>( p.size() ) ) {
|
||||||
update_MTU();
|
|
||||||
throw NetworkException( "Path MTU Discovery", EMSGSIZE );
|
|
||||||
} else if ( bytes_sent == static_cast<int>( p.size() ) ) {
|
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
throw NetworkException( "sendto", errno );
|
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 */
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -99,8 +99,6 @@ namespace Network {
|
|||||||
|
|
||||||
Packet new_packet( string &s_payload );
|
Packet new_packet( string &s_payload );
|
||||||
|
|
||||||
void update_MTU( void );
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Connection( const char *desired_ip ); /* server */
|
Connection( const char *desired_ip ); /* server */
|
||||||
Connection( const char *key_str, const char *ip, int port ); /* client */
|
Connection( const char *key_str, const char *ip, int port ); /* client */
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
source = userinput.proto hostinput.proto transportinstruction.proto
|
source = userinput.proto hostinput.proto transportinstruction.proto
|
||||||
|
|
||||||
PROTOC = protoc
|
PROTOC = protoc
|
||||||
AM_CPPFLAGS = $(protobuf_lite_CFLAGS)
|
AM_CPPFLAGS = $(protobuf_CFLAGS)
|
||||||
AM_CXXFLAGS = -pedantic -Wno-long-long -Werror -Wall -Wextra -fno-default-inline -pipe
|
AM_CXXFLAGS = -pedantic -Wno-long-long -Werror -Wall -fno-default-inline -pipe
|
||||||
|
|
||||||
SUFFIXES = .proto .pb.cc
|
SUFFIXES = .proto .pb.cc
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user