summaryrefslogtreecommitdiffstats
path: root/packet.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2008-05-19 06:59:37 +0200
committerDamien Miller <djm@mindrot.org>2008-05-19 06:59:37 +0200
commitdb255cad0531047a3e35a95af74ad2e03b054412 (patch)
tree7452c18135999436612dcb4e6e7d9c9f2abfe90f /packet.c
parent - jmc@cvs.openbsd.org 2008/05/07 08:00:14 (diff)
downloadopenssh-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.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/packet.c b/packet.c
index 6afe24b9f..a34c040d6 100644
--- a/packet.c
+++ b/packet.c
@@ -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