Revision: 1947
http://complement.svn.sourceforge.net/complement/?rev=1947&view=rev
Author: complement
Date: 2008-07-09 00:11:29 -0700 (Wed, 09 Jul 2008)
Log Message:
-----------
rdbuf()->in_avail() should check positive number
rdbuf()->in_avail() should check positive number, not non-null,
because showmanyc may return -1 to indicate marginal cases.
Modified Paths:
--------------
trunk/complement/explore/include/sockios/socksrv.cc
Modified: trunk/complement/explore/include/sockios/socksrv.cc
===================================================================
--- trunk/complement/explore/include/sockios/socksrv.cc 2008-07-09 07:07:02 UTC (rev 1946)
+++ trunk/complement/explore/include/sockios/socksrv.cc 2008-07-09 07:11:29 UTC (rev 1947)
@@ -1,4 +1,4 @@
-// -*- C++ -*- Time-stamp: <08/07/09 10:41:48 ptr>
+// -*- C++ -*- Time-stamp: <08/07/09 11:09:53 ptr>
/*
* Copyright (c) 2008
@@ -197,7 +197,7 @@
Connect* c = new Connect( *s ); // bad point! I can't read from s in ctor indeed!
- if ( s->rdbuf()->in_avail() ) {
+ if ( s->rdbuf()->in_avail() > 0 ) {
std::tr2::lock_guard<std::tr2::mutex> lk( rdlock );
ready_pool.push_back( processor( c, s ) );
std::cerr << __FILE__ << ":" << __LINE__ << " " << fd << std::endl;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|