summaryrefslogtreecommitdiff
path: root/econproxy.c
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2013-03-13 07:24:54 +0100
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2013-03-13 07:30:04 +0100
commit5023c50ebd83fec0c551ebf82ef797cd7c792423 (patch)
tree4e74ea4a5e640d01b78bb877565b02cb8d78242b /econproxy.c
parentaa32357a46b68c8fab4a24aff00d24b0b0570d92 (diff)
downloadecon-5023c50ebd83fec0c551ebf82ef797cd7c792423.tar.gz
econ-5023c50ebd83fec0c551ebf82ef797cd7c792423.tar.bz2
econ-5023c50ebd83fec0c551ebf82ef797cd7c792423.zip
econpacket: Try to be able to read cmd21
Diffstat (limited to 'econproxy.c')
-rw-r--r--econproxy.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/econproxy.c b/econproxy.c
index 508eae5..f6624e2 100644
--- a/econproxy.c
+++ b/econproxy.c
@@ -108,22 +108,14 @@ ep_get_clientinfo(struct ep *ep)
/* cache projUniqInfo needed for reqconnect */
memcpy(ep->projUniqInfo, ep->epkt.rec.projUniqInfo, ECON_UNIQINFO_LENGTH);
-#if 1
- char buf[BUFSIZ];
- ssize_t len = read(ep->ec_fd, buf, BUFSIZ);
- struct econ_header *hdr = (void *) buf;
- printf("cmd: %d, len: %zd\n", hdr->commandID, len);
-#if 0
if (epkt_read(ep->ec_fd, &ep->epkt) < 0)
- return -1;
-#endif
+ return -1;
- if (hdr->commandID != 21) {
+ if (ep->epkt.hdr.commandID != 21) {
fprintf(stderr, "expected ex clientinfo (21), got: %d\n",
- hdr->commandID);
+ ep->epkt.hdr.commandID);
return -1;
}
-#endif
return 0;
}