diff options
author | Damien Miller <djm@mindrot.org> | 2008-05-19 06:59:37 +0200 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2008-05-19 06:59:37 +0200 |
commit | db255cad0531047a3e35a95af74ad2e03b054412 (patch) | |
tree | 7452c18135999436612dcb4e6e7d9c9f2abfe90f /packet.c | |
parent | - jmc@cvs.openbsd.org 2008/05/07 08:00:14 (diff) | |
download | openssh-db255cad0531047a3e35a95af74ad2e03b054412.tar.xz openssh-db255cad0531047a3e35a95af74ad2e03b054412.zip |
- markus@cvs.openbsd.org 2008/05/08 06:59:01
[bufaux.c buffer.h channels.c packet.c packet.h]
avoid extra malloc/copy/free when receiving data over the net;
~10% speedup for localhost-scp; ok djm@
Diffstat (limited to 'packet.c')
-rw-r--r-- | packet.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -1,4 +1,4 @@ -/* $OpenBSD: packet.c,v 1.151 2008/02/22 20:44:02 dtucker Exp $ */ +/* $OpenBSD: packet.c,v 1.152 2008/05/08 06:59:01 markus Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -1332,6 +1332,12 @@ packet_get_string(u_int *length_ptr) return buffer_get_string(&incoming_packet, length_ptr); } +void * +packet_get_string_ptr(u_int *length_ptr) +{ + return buffer_get_string_ptr(&incoming_packet, length_ptr); +} + /* * Sends a diagnostic message from the server to the client. This message * can be sent at any time (but not while constructing another message). The |