summaryrefslogtreecommitdiff
path: root/lib/ext
diff options
context:
space:
mode:
authorJaak Ristioja <jaak.ristioja@cyber.ee>2016-02-15 12:14:52 +0200
committerNikos Mavrogiannopoulos <nmav@redhat.com>2016-03-21 12:03:37 +0100
commite8a129e6dec5a71c882f821211ed0c5f203b6bdb (patch)
tree8fe48610cb2edc372c84633f9c77f21ad67278df /lib/ext
parent4a4130e775bbada338c0577b5414af9b0a74a186 (diff)
downloadgnutls-e8a129e6dec5a71c882f821211ed0c5f203b6bdb.tar.gz
Broke apart _gnutls_recv_int() to the packet and non-packet cases.
Only gnutls_record_recv_packet() called _gnutls_recv_int() with (packet != NULL). I refactored this logic directly downstream into gnutls_record_recv_packet(). The _gnutls_recv_int() function now only handles non-packet specific logic. The check_session_status() function was created to deduplicate common code which would otherwise have ended up in both functions. The rationale behind this change is to optimize what were previously calls of _gnutls_recv_int(). First of all _gnutls_recv_int() now has only 6 parameters, which according to the x86_64 System V Application Binary Interface should now fit into CPU registers and no longer use the stack. Secondly this change avoids a number of branching checks for both packet and non-packet cases. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Diffstat (limited to 'lib/ext')
-rw-r--r--lib/ext/heartbeat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ext/heartbeat.c b/lib/ext/heartbeat.c
index cc13508a37..77d990b9c5 100644
--- a/lib/ext/heartbeat.c
+++ b/lib/ext/heartbeat.c
@@ -229,7 +229,7 @@ gnutls_heartbeat_ping(gnutls_session_t session, size_t data_size,
case SHB_RECV:
ret =
- _gnutls_recv_int(session, GNUTLS_HEARTBEAT, NULL,
+ _gnutls_recv_int(session, GNUTLS_HEARTBEAT,
NULL, 0, NULL,
session->internals.
hb_actual_retrans_timeout_ms);