Enlightenment CVS committal Author : raster Project : e17 Module : libs/ecore
Dir : e17/libs/ecore/src/lib/ecore_con Modified Files: ecore_con.c Log Message: fix exmaple and spanky =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_con/ecore_con.c,v retrieving revision 1.52 retrieving revision 1.53 diff -u -3 -r1.52 -r1.53 --- ecore_con.c 7 Sep 2005 09:06:06 -0000 1.52 +++ ecore_con.c 23 Sep 2005 05:46:56 -0000 1.53 @@ -545,7 +545,8 @@ if (svr->dead) return 0; if (!data) return 0; if (size < 1) return 0; - ecore_main_fd_handler_active_set(svr->fd_handler, ECORE_FD_READ | ECORE_FD_WRITE); + if (svr->fd_handler) + ecore_main_fd_handler_active_set(svr->fd_handler, ECORE_FD_READ | ECORE_FD_WRITE); if (svr->write_buf) { unsigned char *newbuf; @@ -628,7 +629,8 @@ if (cl->dead) return 0; if (!data) return 0; if (size < 1) return 0; - ecore_main_fd_handler_active_set(cl->fd_handler, ECORE_FD_READ | ECORE_FD_WRITE); + if (cl->fd_handler) + ecore_main_fd_handler_active_set(cl->fd_handler, ECORE_FD_READ | ECORE_FD_WRITE); if (cl->buf) { unsigned char *newbuf; @@ -1009,17 +1011,27 @@ for (;;) { - int num, lost_server = 0; + int num, lost_server; char buf[READBUFSIZ]; + lost_server = 0; #if USE_OPENSSL if (!svr->ssl) { #endif if ((num = read(svr->fd, buf, READBUFSIZ)) < 1) - lost_server = (errno == EIO || errno == EBADF || - errno == EPIPE || errno == EINVAL || - errno == ENOSPC || num == 0); /* is num == 0 right? */ + { + lost_server = ((errno == EIO) || + (errno == EBADF) || + (errno == EPIPE) || + (errno == EINVAL) || + (errno == ENOSPC) || + (num == 0)); + /* is num == 0 is right - when the server closes us + * off we will get this (as this is called when select + * tells us there is data to read!) + */ + } #if USE_OPENSSL } else ------------------------------------------------------- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs