* [Cluster-devel] conga/ricci/common Module.cpp
@ 2007-06-18 3:54 rmccabe
0 siblings, 0 replies; only message in thread
From: rmccabe @ 2007-06-18 3:54 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: conga
Branch: EXPERIMENTAL
Changes by: rmccabe at sourceware.org 2007-06-18 03:54:09
Modified files:
ricci/common : Module.cpp
Log message:
duh.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/common/Module.cpp.diff?cvsroot=cluster&only_with_tag=EXPERIMENTAL&r1=1.5.8.2&r2=1.5.8.3
--- conga/ricci/common/Module.cpp 2007/06/02 04:28:48 1.5.8.2
+++ conga/ricci/common/Module.cpp 2007/06/18 03:54:09 1.5.8.3
@@ -290,27 +290,31 @@
// process event
if (poll_data.revents & POLLIN) {
char buff[4096];
- int ret = read(poll_data.fd, buff, sizeof(buff));
+ int ret;
+
+ ret = read(poll_data.fd, buff, sizeof(buff));
if (ret == -1) {
if (errno == EINTR)
continue;
throw String("error reading stdin: ") + String(strerror(errno));
}
+ if (ret > 0) {
+ data.append(buff, ret);
+ shred(buff, sizeof(buff));
+ }
+
if ((size_t) ret < sizeof(buff)) {
try {
- data.append(buff, ret);
- shred(buff, sizeof(buff));
XMLObject request = parseXML(data);
XMLObject response = module.process(request);
cout << generateXML(response) << endl;
return 0;
- } catch ( ... ) {
- shred(buff, sizeof(buff));
- }
+ } catch ( ... ) { }
}
continue;
}
+
if (poll_data.revents & (POLLERR | POLLHUP | POLLNVAL))
throw String("stdin error: ") + String(strerror(errno));
} // while
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-06-18 3:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-18 3:54 [Cluster-devel] conga/ricci/common Module.cpp rmccabe
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.