On Fri, Dec 17, 2010 at 10:09 AM, Enlightenment SVN <no-re...@enlightenment.org> wrote: > Log: > only check errno if num < 0 > > Author: englebass > Date: 2010-12-17 04:09:14 -0800 (Fri, 17 Dec 2010) > New Revision: 55611 > Trac: http://trac.enlightenment.org/e/changeset/55611 > > Modified: > trunk/ecore/src/lib/ecore_con/ecore_con.c > > Modified: trunk/ecore/src/lib/ecore_con/ecore_con.c > =================================================================== > --- trunk/ecore/src/lib/ecore_con/ecore_con.c 2010-12-17 10:52:59 UTC (rev > 55610) > +++ trunk/ecore/src/lib/ecore_con/ecore_con.c 2010-12-17 12:09:14 UTC (rev > 55611) > @@ -1802,7 +1802,7 @@ > { > num = read(svr->fd, buf, sizeof(buf)); > /* 0 is not a valid return value for a tcp socket */ > - if ((num > 0) || (errno == EAGAIN)) > + if ((num > 0) || ((num < 0) && (errno == EAGAIN))) Why just not check if (num != 0) && ...?
> lost_server = EINA_FALSE; > } > else > @@ -2102,7 +2102,7 @@ > { > num = read(cl->fd, buf, sizeof(buf)); > /* 0 is not a valid return value for a tcp socket */ > - if ((num > 0) || (errno == EAGAIN) || (errno == EINTR)) > + if ((num > 0) || ((num < 0) && ((errno == EAGAIN) || (errno == > EINTR)))) Same here ... > lost_client = EINA_FALSE; > } > else > > > ------------------------------------------------------------------------------ > Lotusphere 2011 > Register now for Lotusphere 2011 and learn how > to connect the dots, take your collaborative environment > to the next level, and enter the era of Social Business. > http://p.sf.net/sfu/lotusphere-d2d > _______________________________________________ > enlightenment-svn mailing list > enlightenment-...@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/enlightenment-svn > -- Fabiano Fidêncio ProFUSION embedded systems http://www.profusion.mobi ------------------------------------------------------------------------------ Lotusphere 2011 Register now for Lotusphere 2011 and learn how to connect the dots, take your collaborative environment to the next level, and enter the era of Social Business. http://p.sf.net/sfu/lotusphere-d2d _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel