# # patch "Makefile.am" # from [927d497eeb593ba394226889e6d8ceadfaec0640] # to [eb4685fad0f867445fa98562113187682c02888c] # # patch "cvs_client.cc" # from [bd795fdb9a8bc92714f0465f47692671a7df259c] # to [9c3d7e67ced18ee40634b6c55f16de53a914955c] # # patch "cvs_client.hh" # from [8a8459a6102164c4b8b550ba5bf2951d2d41dcba] # to [77bdf95ec2ba6503bd3c3ceaa24f931229fa6d72] # ======================================================================== --- Makefile.am 927d497eeb593ba394226889e6d8ceadfaec0640 +++ Makefile.am eb4685fad0f867445fa98562113187682c02888c @@ -47,8 +47,8 @@ cleanup.hh unit_tests.hh interner.hh \ cycle_detector.hh randomfile.hh adler32.hh quick_alloc.hh \ netio.hh smap.hh gettext.h \ - package_revision.c package_revision.h options.hh \ - cvs_client.cc cvs_repository.cc \ + package_revision.c package_revision.h \ + cvs_client.cc cvs_repository.cc \ package_full_revision.c package_full_revision.h options.hh \ i18n.h netxx_pipe.cc @@ -94,8 +94,8 @@ botan/gzip.cpp botan/hash_id.cpp botan/hex.cpp botan/hmac.cpp \ botan/if_algo.cpp botan/inifile.cpp botan/init.cpp \ botan/kdf.cpp botan/keypair.cpp botan/look_pk.cpp \ - botan/lookup.cpp botan/make_prm.cpp botan/md5.cpp \ - botan/mdx_hash.cpp \ + botan/lookup.cpp botan/make_prm.cpp botan/mdx_hash.cpp \ + botan/md5.cpp \ botan/mem_pool.cpp botan/mgf1.cpp botan/mlock.cpp \ botan/mod_exp.cpp botan/mode_pad.cpp botan/modebase.cpp \ botan/mp_comba.cpp botan/mp_core.cpp botan/mp_fkmul.cpp \ @@ -256,8 +256,8 @@ unit_tests_LDADD = lib3rdparty.a -lboost_unit_test_framework$(BOOST_SUFFIX) endif -monotone_LDADD += libplatform.a $(LIBICONV) $(LIBINTL) -lz -unit_tests_LDADD += libplatform.a $(LIBICONV) $(LIBINTL) -lz +monotone_LDADD += libplatform.a $(LIBICONV) $(LIBINTL) +unit_tests_LDADD += libplatform.a $(LIBICONV) $(LIBINTL) if WIN32_PLATFORM libplatform_a_SOURCES += $(WIN32_PLATFORM_SOURCES) ======================================================================== --- cvs_client.cc bd795fdb9a8bc92714f0465f47692671a7df259c +++ cvs_client.cc 9c3d7e67ced18ee40634b6c55f16de53a914955c @@ -119,12 +119,20 @@ void cvs_client::underflow() { char buf[1024],buf2[1024]; try_again: + Netxx::PipeCompatibleProbe probe; + Netxx::Timeout timeout(30L); // 30 seconds + Netxx::PipeStream *pipe=dynamic_cast(&*sess.str); + if (!pipe) probe.add(*(sess.str), sess.which_events()); + else probe.add(*pipe, sess.which_events()); + Netxx::Probe::result_type res = probe.ready(timeout); +#if 0 fd_set rfds; FD_ZERO(&rfds); FD_SET(readfd, &rfds); if (select(readfd+1, &rfds, 0, 0, 0)!=1) throw oops("select error "+std::string(strerror(errno))); +#endif ssize_t avail_in=read(readfd,buf,sizeof buf); if (avail_in<1) throw oops("read error "+std::string(strerror(errno))); ======================================================================== --- cvs_client.hh 8a8459a6102164c4b8b550ba5bf2951d2d41dcba +++ cvs_client.hh 77bdf95ec2ba6503bd3c3ceaa24f931229fa6d72 @@ -9,8 +9,9 @@ #include #include #include "ui.hh" +#include "netxx_pipe.hh" +#include - class cvs_client {public: struct update @@ -80,8 +81,8 @@ }; private: - int readfd,writefd; -// size_t bytes_read,bytes_written; + boost::shared_ptr stream; +// int readfd,writefd; std::auto_ptr byte_in_ticker; std::auto_ptr byte_out_ticker; typedef std::set stringset_t;