[sr-dev] git:sr_3.0: tls: fix state change while waiting for lock return

Andrei Pelinescu-Onciul andrei at iptel.org
Mon Aug 23 17:17:13 CEST 2010


Module: sip-router
Branch: sr_3.0
Commit: 513c21f67f88484dd12dd6adce6d6ddc7fb60c31
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=513c21f67f88484dd12dd6adce6d6ddc7fb60c31

Author: Andrei Pelinescu-Onciul <andrei at iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei at 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

---

 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);




More information about the sr-dev mailing list