com php-src: Rename fcgi_request.closed to .ended: main/fastcgi.c main/fastcgi.h

From: Date: Sat, 07 Jan 2017 21:45:19 +0000
Subject: com php-src: Rename fcgi_request.closed to .ended: main/fastcgi.c main/fastcgi.h
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-96609@lists.php.net to get a copy of this message
Commit: f346bd6ee6a9eecb3666071d3afd30216439367d Author: Nikita Popov <nikic@php.net> Sat, 7 Jan 2017 22:42:45 +0100 Parents: 2cb8950cc2ce784a9660a3e07ddf84a9094cfe91 Branches: PHP-7.0 PHP-7.1 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=f346bd6ee6a9eecb3666071d3afd30216439367d Log: Rename fcgi_request.closed to .ended "closed" refers to whether FCGI_END_REQUEST has been sent, while the "close" operation does something entirely different. It gets extra confusing when fcgi_is_closed() does not actually return fcgi_request.closed... Changed paths: M main/fastcgi.c M main/fastcgi.h Diff: diff --git a/main/fastcgi.c b/main/fastcgi.c index bf4eb6c..c52d222 100644 --- a/main/fastcgi.c +++ b/main/fastcgi.c @@ -216,7 +216,7 @@ struct _fcgi_request { #ifdef TCP_NODELAY int nodelay; #endif - int closed; + int ended; int in_len; int in_pad; @@ -1045,7 +1045,7 @@ static int fcgi_read_request(fcgi_request *req) unsigned char buf[FCGI_MAX_LENGTH+8]; req->keep = 0; - req->closed = 0; + req->ended = 0; req->in_len = 0; req->out_hdr = NULL; req->out_pos = req->out_buf; @@ -1503,7 +1503,7 @@ static inline void close_packet(fcgi_request *req) } } -int fcgi_flush(fcgi_request *req, int close) +int fcgi_flush(fcgi_request *req, int end) { int len; @@ -1511,7 +1511,7 @@ int fcgi_flush(fcgi_request *req, int close) len = (int)(req->out_pos - req->out_buf); - if (close) { + if (end) { fcgi_end_request_rec *rec = (fcgi_end_request_rec*)(req->out_pos); fcgi_make_header(&rec->hdr, FCGI_END_REQUEST, req->id, sizeof(fcgi_end_request)); @@ -1650,9 +1650,9 @@ int fcgi_finish_request(fcgi_request *req, int force_close) int ret = 1; if (req->fd >= 0) { - if (!req->closed) { + if (!req->ended) { ret = fcgi_flush(req, 1); - req->closed = 1; + req->ended = 1; } fcgi_close(req, force_close, 1); } diff --git a/main/fastcgi.h b/main/fastcgi.h index 460ace5..fbc70c3 100644 --- a/main/fastcgi..h +++ b/main/fastcgi.h @@ -118,7 +118,7 @@ void fcgi_loadenv(fcgi_request *req, fcgi_apply_func load_func, zval *array); int fcgi_read(fcgi_request *req, char *str, int len); int fcgi_write(fcgi_request *req, fcgi_request_type type, const char *str, int len); -int fcgi_flush(fcgi_request *req, int close); +int fcgi_flush(fcgi_request *req, int end); #ifdef PHP_WIN32 void fcgi_impersonate(void);

« previous php.cvs (#96609) next »