summaryrefslogtreecommitdiff
path: root/lib/gnutls_constate.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2002-03-20 18:13:39 +0000
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2002-03-20 18:13:39 +0000
commitea57a587968692cd511a3ab708c39ad78276f40f (patch)
tree65631a2505667d180e4824134b82c9c03b3352a5 /lib/gnutls_constate.c
parentb62ab22770ac03598c53246f4b2e3f30daabc1d3 (diff)
downloadgnutls-ea57a587968692cd511a3ab708c39ad78276f40f.tar.gz
Optimizations and fixes in compression
Diffstat (limited to 'lib/gnutls_constate.c')
-rw-r--r--lib/gnutls_constate.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/lib/gnutls_constate.c b/lib/gnutls_constate.c
index e359ef1c40..a41379b2bb 100644
--- a/lib/gnutls_constate.c
+++ b/lib/gnutls_constate.c
@@ -315,9 +315,7 @@ int rc;
gnutls_comp_init(state->security_parameters.
read_compression_algorithm, 1);
if (state->connection_state.read_compression_state ==
- GNUTLS_COMP_FAILED
- && state->security_parameters.read_compression_algorithm !=
- GNUTLS_COMP_NULL) {
+ GNUTLS_COMP_FAILED) {
gnutls_assert();
return GNUTLS_E_UNKNOWN_COMPRESSION_ALGORITHM;
}
@@ -354,11 +352,9 @@ int rc;
state->connection_state.read_compression_state =
gnutls_comp_init(state->security_parameters.
read_compression_algorithm, 1);
-
+
if (state->connection_state.read_compression_state ==
- GNUTLS_COMP_FAILED
- && state->security_parameters.read_compression_algorithm !=
- GNUTLS_COMP_NULL) {
+ GNUTLS_COMP_FAILED) {
gnutls_assert();
return GNUTLS_E_UNKNOWN_COMPRESSION_ALGORITHM;
}
@@ -483,8 +479,7 @@ int rc;
state->connection_state.write_compression_state =
gnutls_comp_init(state->security_parameters.write_compression_algorithm, 0);
- if (state->connection_state.write_compression_state == GNUTLS_COMP_FAILED
- && state->security_parameters.write_compression_algorithm != GNUTLS_COMP_NULL) {
+ if (state->connection_state.write_compression_state == GNUTLS_COMP_FAILED) {
gnutls_assert();
return GNUTLS_E_UNKNOWN_COMPRESSION_ALGORITHM;
}
@@ -522,9 +517,7 @@ int rc;
gnutls_comp_init(state->security_parameters.write_compression_algorithm, 0);
if (state->connection_state.write_compression_state ==
- GNUTLS_COMP_FAILED
- && state->security_parameters.write_compression_algorithm !=
- GNUTLS_CIPHER_NULL) {
+ GNUTLS_COMP_FAILED) {
gnutls_assert();
return GNUTLS_E_UNKNOWN_COMPRESSION_ALGORITHM;
}