comparison src/http/ngx_http_upstream.c @ 5557:188481078faf

Use ngx_socket_errno where appropriate. Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
author Piotr Sikora <piotr@cloudflare.com>
date Mon, 03 Feb 2014 14:17:17 -0800
parents f385349d584b
children 7586e7b2dbe9
comparison
equal deleted inserted replaced
5556:4006bf77943b 5557:188481078faf
1094 */ 1094 */
1095 1095
1096 if (getsockopt(c->fd, SOL_SOCKET, SO_ERROR, (void *) &err, &len) 1096 if (getsockopt(c->fd, SOL_SOCKET, SO_ERROR, (void *) &err, &len)
1097 == -1) 1097 == -1)
1098 { 1098 {
1099 err = ngx_errno; 1099 err = ngx_socket_errno;
1100 } 1100 }
1101 1101
1102 if (err) { 1102 if (err) {
1103 ev->error = 1; 1103 ev->error = 1;
1104 } 1104 }
1975 */ 1975 */
1976 1976
1977 if (getsockopt(c->fd, SOL_SOCKET, SO_ERROR, (void *) &err, &len) 1977 if (getsockopt(c->fd, SOL_SOCKET, SO_ERROR, (void *) &err, &len)
1978 == -1) 1978 == -1)
1979 { 1979 {
1980 err = ngx_errno; 1980 err = ngx_socket_errno;
1981 } 1981 }
1982 1982
1983 if (err) { 1983 if (err) {
1984 c->log->action = "connecting to upstream"; 1984 c->log->action = "connecting to upstream";
1985 (void) ngx_connection_error(c, err, "connect() failed"); 1985 (void) ngx_connection_error(c, err, "connect() failed");