[PATCH] tls: fix state change while waiting for lock return
Andrei Pelinescu-Onciul
andrei at iptel.org
Fri Aug 20 12:22:56 CEST 2010
tls_h_fix_read_conn() did not return the right thing if the state
changed while waiting for the lock (the fall-through return was
error instead of success).
Reported-by: Couprie Geoffroy geoffroy couprie atosorigin com
---
modules/tls/tls_server.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/modules/tls/tls_server.c b/modules/tls/tls_server.c
index 6d32af6..52b62e3 100644
--- a/modules/tls/tls_server.c
+++ b/modules/tls/tls_server.c
@@ -971,7 +971,7 @@ int tls_h_fix_read_conn(struct tcp_connection *c)
int ret;
struct tls_extra_data* tls_c;
- ret = -1;
+ ret = 1;
tls_c = 0;
if (unlikely(c->extra_data==0)){
lock_get(&c->write_lock);
--
1.7.2.1
--N1GIdlSm9i+YlY4t--
More information about the sr-users
mailing list