Module: sip-router
Branch: kamailio_3.0
Commit: 82fe7671c9c65cde0bd53bab615fa37b627fe3c2
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=82fe767…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Date: Fri Aug 20 12:22:56 2010 +0200
tls: fix state change while waiting for lock return
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
(cherry picked from commit 513c21f67f88484dd12dd6adce6d6ddc7fb60c31)
---
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);