ignore EINVAL from setsockopt() on Solaris
Igor Sysoev
13 years ago
781 | 781 |
{
|
782 | 782 |
ngx_uint_t level;
|
783 | 783 |
|
784 | |
if (err == NGX_ECONNRESET
|
785 | |
&& c->log_error == NGX_ERROR_IGNORE_ECONNRESET)
|
786 | |
{
|
|
784 |
if (err == NGX_ECONNRESET && c->log_error == NGX_ERROR_IGNORE_ECONNRESET) {
|
787 | 785 |
return 0;
|
788 | 786 |
}
|
|
787 |
|
|
788 |
#if (NGX_SOLARIS)
|
|
789 |
if (err == NGX_EINVAL && c->log_error == NGX_ERROR_IGNORE_EINVAL) {
|
|
790 |
return 0;
|
|
791 |
}
|
|
792 |
#endif
|
789 | 793 |
|
790 | 794 |
if (err == 0
|
791 | 795 |
|| err == NGX_ECONNRESET
|
|
802 | 806 |
{
|
803 | 807 |
switch (c->log_error) {
|
804 | 808 |
|
|
809 |
case NGX_ERROR_IGNORE_EINVAL:
|
805 | 810 |
case NGX_ERROR_IGNORE_ECONNRESET:
|
806 | 811 |
case NGX_ERROR_INFO:
|
807 | 812 |
level = NGX_LOG_INFO;
|
68 | 68 |
|
69 | 69 |
|
70 | 70 |
typedef enum {
|
71 | |
NGX_ERROR_CRIT = 0,
|
|
71 |
NGX_ERROR_ALERT = 0,
|
72 | 72 |
NGX_ERROR_ERR,
|
73 | 73 |
NGX_ERROR_INFO,
|
74 | |
NGX_ERROR_IGNORE_ECONNRESET
|
|
74 |
NGX_ERROR_IGNORE_ECONNRESET,
|
|
75 |
NGX_ERROR_IGNORE_EINVAL
|
75 | 76 |
} ngx_connection_log_error_e;
|
76 | 77 |
|
77 | 78 |
|
|
130 | 131 |
|
131 | 132 |
unsigned buffered:8;
|
132 | 133 |
|
133 | |
unsigned log_error:2; /* ngx_connection_log_error_e */
|
|
134 |
unsigned log_error:3; /* ngx_connection_log_error_e */
|
134 | 135 |
|
135 | 136 |
unsigned single_connection:1;
|
136 | 137 |
unsigned unexpected_eof:1;
|