comparison src/event/ngx_event.c @ 454:a8424ffa495c NGINX_0_7_39

nginx 0.7.39 *) Bugfix: large response with SSI might hang, if gzipping was enabled; the bug had appeared in 0.7.28. Thanks to Artem Bokhan. *) Bugfix: a segmentation fault might occur in worker process, if short static variants are used in a "try_files" directive.
author Igor Sysoev <http://sysoev.ru>
date Mon, 02 Mar 2009 00:00:00 +0300
parents 6ebbca3d5ed7
children 549994537f15
comparison
equal deleted inserted replaced
453:9ef0e36f3cd5 454:a8424ffa495c
1038 1038
1039 ngx_int_t rc; 1039 ngx_int_t rc;
1040 ngx_str_t *value; 1040 ngx_str_t *value;
1041 ngx_event_debug_t *dc; 1041 ngx_event_debug_t *dc;
1042 struct hostent *h; 1042 struct hostent *h;
1043 ngx_inet_cidr_t in_cidr; 1043 ngx_cidr_t cidr;
1044 1044
1045 value = cf->args->elts; 1045 value = cf->args->elts;
1046
1047 /* AF_INET only */
1048 1046
1049 dc = ngx_array_push(&ecf->debug_connection); 1047 dc = ngx_array_push(&ecf->debug_connection);
1050 if (dc == NULL) { 1048 if (dc == NULL) {
1051 return NGX_CONF_ERROR; 1049 return NGX_CONF_ERROR;
1052 } 1050 }
1053 1051
1054 rc = ngx_ptocidr(&value[1], &in_cidr); 1052 rc = ngx_ptocidr(&value[1], &cidr);
1055 1053
1056 if (rc == NGX_DONE) { 1054 if (rc == NGX_DONE) {
1057 ngx_conf_log_error(NGX_LOG_WARN, cf, 0, 1055 ngx_conf_log_error(NGX_LOG_WARN, cf, 0,
1058 "low address bits of %V are meaningless", &value[1]); 1056 "low address bits of %V are meaningless", &value[1]);
1059 rc = NGX_OK; 1057 rc = NGX_OK;
1060 } 1058 }
1061 1059
1062 if (rc == NGX_OK) { 1060 if (rc == NGX_OK) {
1063 dc->mask = in_cidr.mask; 1061
1064 dc->addr = in_cidr.addr; 1062 /* AF_INET only */
1063
1064 if (cidr.family != AF_INET) {
1065 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
1066 "\"debug_connection\" supports IPv4 only");
1067 return NGX_CONF_ERROR;
1068 }
1069
1070 dc->mask = cidr.u.in.mask;
1071 dc->addr = cidr.u.in.addr;
1072
1065 return NGX_CONF_OK; 1073 return NGX_CONF_OK;
1066 } 1074 }
1067 1075
1068 h = gethostbyname((char *) value[1].data); 1076 h = gethostbyname((char *) value[1].data);
1069 1077