diff options
author | des <des@FreeBSD.org> | 2002-10-29 09:43:00 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2002-10-29 09:43:00 +0000 |
commit | 099d1a58f7bc088a9f71af6d32542ca3949468a3 (patch) | |
tree | 49cef8938d7beb10016662d15546fa090865073d /crypto/openssh/msg.c | |
parent | 1ba793a7c09e24d920de3983a3223770cb37ebff (diff) | |
download | FreeBSD-src-099d1a58f7bc088a9f71af6d32542ca3949468a3.zip FreeBSD-src-099d1a58f7bc088a9f71af6d32542ca3949468a3.tar.gz |
Vendor import of OpenSSH-portable 3.5p1.
Diffstat (limited to 'crypto/openssh/msg.c')
-rw-r--r-- | crypto/openssh/msg.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/crypto/openssh/msg.c b/crypto/openssh/msg.c index 7275c84..107a376 100644 --- a/crypto/openssh/msg.c +++ b/crypto/openssh/msg.c @@ -22,7 +22,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "includes.h" -RCSID("$OpenBSD: msg.c,v 1.3 2002/06/24 15:49:22 itojun Exp $"); +RCSID("$OpenBSD: msg.c,v 1.4 2002/07/01 16:15:25 deraadt Exp $"); #include "buffer.h" #include "getput.h" @@ -31,43 +31,43 @@ RCSID("$OpenBSD: msg.c,v 1.3 2002/06/24 15:49:22 itojun Exp $"); #include "msg.h" void -msg_send(int fd, u_char type, Buffer *m) +ssh_msg_send(int fd, u_char type, Buffer *m) { u_char buf[5]; u_int mlen = buffer_len(m); - debug3("msg_send: type %u", (unsigned int)type & 0xff); + debug3("ssh_msg_send: type %u", (unsigned int)type & 0xff); PUT_32BIT(buf, mlen + 1); buf[4] = type; /* 1st byte of payload is mesg-type */ if (atomicio(write, fd, buf, sizeof(buf)) != sizeof(buf)) - fatal("msg_send: write"); + fatal("ssh_msg_send: write"); if (atomicio(write, fd, buffer_ptr(m), mlen) != mlen) - fatal("msg_send: write"); + fatal("ssh_msg_send: write"); } int -msg_recv(int fd, Buffer *m) +ssh_msg_recv(int fd, Buffer *m) { u_char buf[4]; ssize_t res; u_int msg_len; - debug3("msg_recv entering"); + debug3("ssh_msg_recv entering"); res = atomicio(read, fd, buf, sizeof(buf)); if (res != sizeof(buf)) { if (res == 0) return -1; - fatal("msg_recv: read: header %ld", (long)res); + fatal("ssh_msg_recv: read: header %ld", (long)res); } msg_len = GET_32BIT(buf); if (msg_len > 256 * 1024) - fatal("msg_recv: read: bad msg_len %d", msg_len); + fatal("ssh_msg_recv: read: bad msg_len %u", msg_len); buffer_clear(m); buffer_append_space(m, msg_len); res = atomicio(read, fd, buffer_ptr(m), msg_len); if (res != msg_len) - fatal("msg_recv: read: %ld != msg_len", (long)res); + fatal("ssh_msg_recv: read: %ld != msg_len", (long)res); return 0; } |