=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/rsync/io.c,v retrieving revision 1.1 retrieving revision 1.2 diff -c -r1.1 -r1.2 *** src/usr.bin/rsync/io.c 2019/02/10 23:18:28 1.1 --- src/usr.bin/rsync/io.c 2019/02/10 23:24:14 1.2 *************** *** 1,4 **** ! /* $Id: io.c,v 1.1 2019/02/10 23:18:28 benno Exp $ */ /* * Copyright (c) 2019 Kristaps Dzonsons * --- 1,4 ---- ! /* $Id: io.c,v 1.2 2019/02/10 23:24:14 benno Exp $ */ /* * Copyright (c) 2019 Kristaps Dzonsons * *************** *** 302,308 **** LOG0(sess, "%.*s", (int)sess->mplex_read_remain, mpbuf); sess->mplex_read_remain = 0; ! /* * I only know that a tag of one means an error. * This means that we should exit. */ --- 302,308 ---- LOG0(sess, "%.*s", (int)sess->mplex_read_remain, mpbuf); sess->mplex_read_remain = 0; ! /* * I only know that a tag of one means an error. * This means that we should exit. */ *************** *** 413,419 **** * is insufficient for the new data. */ void ! io_buffer_buf(struct sess *sess, void *buf, size_t *bufpos, size_t buflen, const void *val, size_t valsz) { --- 413,419 ---- * is insufficient for the new data. */ void ! io_buffer_buf(struct sess *sess, void *buf, size_t *bufpos, size_t buflen, const void *val, size_t valsz) { *************** *** 426,437 **** * Converts "val" to LE prior to io_buffer_buf(). */ void ! io_buffer_int(struct sess *sess, void *buf, size_t *bufpos, size_t buflen, int32_t val) { int32_t nv = htole32(val); ! io_buffer_buf(sess, buf, bufpos, buflen, &nv, sizeof(int32_t)); } --- 426,437 ---- * Converts "val" to LE prior to io_buffer_buf(). */ void ! io_buffer_int(struct sess *sess, void *buf, size_t *bufpos, size_t buflen, int32_t val) { int32_t nv = htole32(val); ! io_buffer_buf(sess, buf, bufpos, buflen, &nv, sizeof(int32_t)); } *************** *** 523,529 **** * Increases "bufpos" to the new position. */ void ! io_unbuffer_buf(struct sess *sess, const void *buf, size_t *bufpos, size_t bufsz, void *val, size_t valsz) { --- 523,529 ---- * Increases "bufpos" to the new position. */ void ! io_unbuffer_buf(struct sess *sess, const void *buf, size_t *bufpos, size_t bufsz, void *val, size_t valsz) { *************** *** 536,553 **** * Calls io_unbuffer_buf() and converts from LE. */ void ! io_unbuffer_int(struct sess *sess, const void *buf, size_t *bufpos, size_t bufsz, int32_t *val) { int32_t oval; ! io_unbuffer_buf(sess, buf, bufpos, bufsz, &oval, sizeof(int32_t)); *val = le32toh(oval); } int ! io_unbuffer_size(struct sess *sess, const void *buf, size_t *bufpos, size_t bufsz, size_t *val) { int32_t oval; --- 536,553 ---- * Calls io_unbuffer_buf() and converts from LE. */ void ! io_unbuffer_int(struct sess *sess, const void *buf, size_t *bufpos, size_t bufsz, int32_t *val) { int32_t oval; ! io_unbuffer_buf(sess, buf, bufpos, bufsz, &oval, sizeof(int32_t)); *val = le32toh(oval); } int ! io_unbuffer_size(struct sess *sess, const void *buf, size_t *bufpos, size_t bufsz, size_t *val) { int32_t oval; *************** *** 582,585 **** } return 1; } - --- 582,584 ----