Browse Source

Dont zero binary data eom

master
ckolivas 9 years ago
parent
commit
be17fb808a
  1. 4
      src/ckpool.c

4
src/ckpool.c

@ -761,13 +761,13 @@ int read_socket_line(connsock_t *cs, float *timeout)
if (unlikely(ret > 5) && (bkey = strstr(cs->buf + ret - 5, "bkey"))) { if (unlikely(ret > 5) && (bkey = strstr(cs->buf + ret - 5, "bkey"))) {
eom = bkey_eom(ckp, cs, bkey, timeout); eom = bkey_eom(ckp, cs, bkey, timeout);
ret = eom - cs->buf; ret = eom - cs->buf;
} } else
*eom = '\0';
cs->buflen = cs->buf + cs->bufofs - eom - 1; cs->buflen = cs->buf + cs->bufofs - eom - 1;
if (cs->buflen) if (cs->buflen)
cs->bufofs = eom - cs->buf + 1; cs->bufofs = eom - cs->buf + 1;
else else
cs->bufofs = 0; cs->bufofs = 0;
*eom = '\0';
out: out:
if (ret < 0) { if (ret < 0) {
empty_buffer(cs); empty_buffer(cs);

Loading…
Cancel
Save