From mboxrd@z Thu Jan 1 00:00:00 1970 From: rmccabe@sourceware.org Date: 1 Jun 2007 23:12:22 -0000 Subject: [Cluster-devel] conga/ricci/common ClientSocket.cpp Module.cpp Message-ID: <20070601231222.12688.qmail@sourceware.org> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit CVSROOT: /cvs/cluster Module name: conga Branch: EXPERIMENTAL Changes by: rmccabe at sourceware.org 2007-06-01 23:12:22 Modified files: ricci/common : ClientSocket.cpp Module.cpp Log message: - Increase read buffers for network traffic from 1k to 4k, and include errno info in exceptions in the network code. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/common/ClientSocket.cpp.diff?cvsroot=cluster&only_with_tag=EXPERIMENTAL&r1=1.7&r2=1.7.2.1 http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/common/Module.cpp.diff?cvsroot=cluster&only_with_tag=EXPERIMENTAL&r1=1.5&r2=1.5.8.1 --- conga/ricci/common/ClientSocket.cpp 2007/03/23 17:25:12 1.7 +++ conga/ricci/common/ClientSocket.cpp 2007/06/01 23:12:22 1.7.2.1 @@ -27,6 +27,7 @@ #include #include +#include #include #include #include @@ -159,14 +160,14 @@ throw String("ClientSocket::recv(): socket already closed"); while (true) { - char buffer[1024]; + char buffer[4096]; int ret = ::recv(_sock, buffer, sizeof(buffer), 0); if (ret == -1) { if (errno == EINTR) continue; else if (errno == EAGAIN) return ""; - throw String("ClientSocket::recv(): recv error"); + throw String("ClientSocket::recv(): recv error: ") + String(strerror(errno)); } if (ret == 0) { @@ -204,10 +205,9 @@ if (ret == -1) { if (errno == EINTR) continue; - else if (errno == EAGAIN || - errno == EWOULDBLOCK) + else if (errno == EAGAIN || errno == EWOULDBLOCK) return msg; - throw String("ClientSocket::send(): socket error"); + throw String("ClientSocket::send(): socket error: ") + String(strerror(errno)); } // log(String("sent ") + ret + " bytes thru socket " + _sock, --- conga/ricci/common/Module.cpp 2006/08/15 04:15:52 1.5 +++ conga/ricci/common/Module.cpp 2007/06/01 23:12:22 1.5.8.1 @@ -1,5 +1,5 @@ /* - Copyright Red Hat, Inc. 2006 + Copyright Red Hat, Inc. 2006-2007 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the @@ -276,7 +276,7 @@ // process event if (poll_data.revents & POLLIN) { - char buff[1024]; + char buff[4096]; int ret = read(poll_data.fd, buff, sizeof(buff)); if (ret == -1) { if (errno == EINTR)