Move from protobuf-lite to protobuf to accommodate Ubuntu lucid

Add changelog entry
This commit is contained in:
Keith Winstein
2012-02-19 23:48:20 -05:00
parent 356ce40cea
commit 58b584a2b3
8 changed files with 13 additions and 39 deletions
+1 -1
View File
@@ -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
+6
View File
@@ -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
* Relax autoconf dependency
+1 -1
View File
@@ -2,7 +2,7 @@ Source: mosh
Section: net
Priority: optional
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
Homepage: http://mosh.mit.edu
Vcs-Git: git://github.com/keithw/mosh.git
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
+1 -31
View File
@@ -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<int>( p.size() ) ) {
if ( bytes_sent == static_cast<ssize_t>( 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 */
}
-2
View File
@@ -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 */
+2 -2
View File
@@ -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