]> granicus.if.org Git - php/commitdiff
fcgi_is_allowed should not log error
authorXinchen Hui <laruence@gmail.com>
Sun, 24 May 2015 06:21:04 +0000 (14:21 +0800)
committerXinchen Hui <laruence@gmail.com>
Sun, 24 May 2015 06:21:04 +0000 (14:21 +0800)
main/fastcgi.c

index 0cbe01ab366843ad6fa5b2ea17ba6f8596bc8449..675b9a88b0bd6c08c71baccb3f6fa1a2a4e27c5d 100644 (file)
@@ -1239,7 +1239,6 @@ static int fcgi_is_allowed() {
        }
 #endif
 
-       fcgi_log(FCGI_ERROR, "Connection disallowed: IP address '%s' has been dropped.", fcgi_get_last_client_ip());
        return 0;
 }
 
@@ -1296,6 +1295,7 @@ FCGI_API int fcgi_accept_request(fcgi_request *req)
 
                                        client_sa = sa;
                                        if (req->fd >= 0 && !fcgi_is_allowed()) {
+                                               fcgi_log(FCGI_ERROR, "Connection disallowed: IP address '%s' has been dropped.", fcgi_get_last_client_ip());
                                                closesocket(req->fd);
                                                req->fd = -1;
                                                continue;