Browse code

always check if we need to end the SESSION

git-svn-id: file:///var/lib/svn/clamav-devel/trunk/clamav-devel@1285 77e5149b-7576-45b1-b177-96237e5ba77b

Trog authored on 2005/01/27 03:23:38
Showing 2 changed files
... ...
@@ -1,3 +1,7 @@
1
+Wed Jan 26 18:20:40 GMT 2005 (trog)
2
+-----------------------------------
3
+  * clamd/server-th.c: always check if we need to end the SESSION.
4
+
1 5
 Wed Jan 26 19:01:27 CET 2005 (tk)
2 6
 ---------------------------------
3 7
   * libclamav/others: increase flevel
... ...
@@ -109,22 +109,19 @@ void scanner_thread(void *arg)
109 109
 	    case COMMAND_END:
110 110
 		session = FALSE;
111 111
 		break;
112
-
113
-	    case COMMAND_TIMEOUT:
114
-		if (session) {
115
-		    pthread_mutex_lock(&exit_mutex);
116
-		    if(progexit) {
117
-			session = FALSE;
118
-		    }
119
-		    pthread_mutex_unlock(&exit_mutex);
120
-                    pthread_mutex_lock(&reload_mutex);
121
-                    if(reload) {
122
-			session = FALSE;
123
-		    }
124
-                    pthread_mutex_unlock(&reload_mutex);
125
-		}
126
-		break;
127
-        }
112
+	}
113
+	if (session) {
114
+	    pthread_mutex_lock(&exit_mutex);
115
+	    if(progexit) {
116
+		session = FALSE;
117
+	    }
118
+	    pthread_mutex_unlock(&exit_mutex);
119
+	    pthread_mutex_lock(&reload_mutex);
120
+	    if(reload) {
121
+		session = FALSE;
122
+	    }
123
+	    pthread_mutex_unlock(&reload_mutex);
124
+	}
128 125
     } while (session);
129 126
 
130 127
     close(conn->sd);