فهرست منبع

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)
Andrei Pelinescu-Onciul 15 سال پیش
والد
کامیت
82fe7671c9
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      modules/tls/tls_server.c

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