Hello, Implementing ngx_strstrn () is exposed. This can be misleading. regards, yves # HG changeset patch # User Yves Crespin<yves.crespin@e-quartz.fr> # Date 1407491120 -7200 # Node ID 505ec91d60fefa776bc2c7fcbd6d980cc85b6b5e # Parent 74265a0edba677c967f532de789a4589436aa5fb Implemention ngx_strstrn() is no longer exposed. The third parameter must be the length of theby crespin - Nginx Mailing List - English
Hello, I don't understand why b->last is used to initialize b->end. Why it's not : b->end = b->start + size; Regards, yves # HG changeset patch # User Yves Crespin<yves.crespin@e-quartz.fr> # Date 1407480933 -7200 # Node ID 74265a0edba677c967f532de789a4589436aa5fb # Parent a62fffc16af816612a4acf34c7a4781f454fa5d1 ngx_buf: initialize b->end with b->stby crespin - Nginx Mailing List - English
Hello, Here is the corresponding patch. Regards, yves # HG changeset patch # User Yves Crespin<yves.crespin@e-quartz.fr> # Date 1407480323 -7200 # Node ID a62fffc16af816612a4acf34c7a4781f454fa5d1 # Parent 8120c2937062998497546a3ecb38b78bb302fe34 Upstream: ngx_socket_errno can only be used if |recv()| failed if |recv()| is a success, err will have a random value. onlyby crespin - Nginx Mailing List - English
Hello, ngx_sleep() macro is unused. regards, yves # HG changeset patch # User Yves Crespin<yves.crespin@e-quartz.fr> # Date 1407420247 -7200 # Node ID 8120c2937062998497546a3ecb38b78bb302fe34 # Parent 97fcc94109c0ea7b929f7fa5a8c7ee95ecf7cb5c remove unused ngx_sleep() macro In win32 implementation, even for a long sleep (60s), ngx_msleep() is used instead of ngx_sleep(by crespin - Nginx Mailing List - English
Hello, I notice a wrong format %d for ngx_uint_t variable in ngx_poll_module.c. Regards, yves # HG changeset patch # User Yves Crespin<yves.crespin@e-quartz.fr> # Date 1407416683 -7200 # Node ID 97fcc94109c0ea7b929f7fa5a8c7ee95ecf7cb5c # Parent b71a279c696bcd18bd6b3c2845fe8e51d57ea1fd use format %ui according to i type diff -r b71a279c696b -r 97fcc94109c0 src/event/modulby crespin - Nginx Mailing List - English
Hello, In ngx_epoll_module.c, nevents is defined as ngx_uint_t and ev->index is also a ngx_uint_t. So I proposed to change nevents type. I'm not sure about variable declaration: - ngx_int_t i, nready; + ngx_uint_t i; + ngx_int_t nready; ngx_uint_t found, level; It's perhaps better to group variable by type: - ngx_int_tby crespin - Nginx Mailing List - English
Hello, here is the corresponding patch. regards, yves > Yes, %d here is certainly incorrect, as int and ngx_int_t sizes > may differ. I don't think there are any platforms with poll() > where this may cause problems, but nevertheless it's worth fixing. > Changing this to %ui should be ok. # HG changeset patch # User Yves Crespin<yves.crespin@e-quartz.fr>by crespin - Nginx Mailing List - English
Maxim Dounin Wrote: ------------------------------------------------------- > Hello! > > On Wed, Aug 06, 2014 at 10:22:10AM -0400, crespin wrote: > > > Hello, > > > > nevents is an ngx_int_t, so the print format must be "%i". > > Both signed and unsigned ngx_int_t has the same size, so that's > more about preferable representation ofby crespin - Nginx Mailing List - English
Hello, nevents is an ngx_int_t, so the print format must be "%i". Regards, yves static ngx_int_t nevents; --- a/nginx-1.7.4/src/event/modules/ngx_poll_module.c +++ b/nginx-1.7.4/src/event/modules/ngx_poll_module.c @@ -201,7 +201,7 @@ ngx_poll_del_event(ngx_event_t *ev, ngx_int_t event, ngx_uint_t flags) if (ev->index < (ngx_uint_t) nevents) {by crespin - Nginx Mailing List - English
Maxim Dounin Wrote: ------------------------------------------------------- > Hello! > > On Fri, Jun 27, 2014 at 09:26:23AM -0400, crespin wrote: > > > Hello, > > > > here is another path still on ngx_http_request.c. > > In function ngx_http_close_request(), the second parameter is an > error > > code. > > > > This error codby crespin - Nginx Mailing List - English
Hello, here is another path still on ngx_http_request.c. In function ngx_http_close_request(), the second parameter is an error code. This error code is used in ngx_http_free_request() to set the HTTP status code if it's not present or if no bytes are already sent. Use NGX_OK instead of zero seems - for me - valid. When ngx_http_close_request() is called after an error, I guess it's mby crespin - Nginx Mailing List - English
Hello, Reading ngx_http_request.c source code, I notice some call to ngx_http_terminate_request() is called sometimes with 0 instead of a return code. 0 is a correct valid for a return code ... it's NGX_OK. Is the patch valid ? It's based on nginx-1.7.2 version. Thanks for your reply. yves Subject: use a return code for ngx_http_terminate_request() --- 1.0/source/nginx-by crespin - Nginx Mailing List - English
Hello, ngx_sleep() is newer used ... and I guess it will newer used. ./os/unix/ngx_time.h:#define ngx_sleep(s) (void) sleep(s) Regards, yvesby crespin - Nginx Mailing List - English
Hello Ruslan, Thanks for your remark. Is it necessary to send the correct patch ? Regards, yvesby crespin - Nginx Mailing List - English
Hello, errno is only set on error, so if |recv()| is a success, |err| will have a random value. Only debug message are impacted. Can you check if it is ok? Comments are welcome. Feel free to change the patch. Regards, yves --- nginx-1.6.0/src/http/ngx_http_upstream.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/nginx-1.6.0/src/http/ngx_http_upstby crespin - Nginx Mailing List - English
Hello, I wrote a module that records requests that are processed within a cluster. Is it possible to set a handle to be regularly reminded and when the response is available to transmit. When the data are not yet available, the handle assumes the data transmission. Thanks and regards, yvesby crespin - Nginx Mailing List - English
> Install a cleanup handler on a connection or request pool. Take > a look at limit_conn module to see an example: > > http://hg.nginx.org/nginx/file/3a48775f1535/src/http/modules/ngx_http_ > limit_conn_module.c#l258 Thanks ! It's easy to implement.by crespin - Nginx Mailing List - English
Hello, I'm write a module storing requests in an memory array. An internal thread send request in a cluster. I need to be aware of deconnection for specific post-treatment. I'm unable to find any API. How to setup a handle on disconnection ? Thanks and regards Yvesby crespin - Nginx Mailing List - English