search for: so_error

Displaying 20 results from an estimated 27 matches for "so_error".

Did you mean: io_error
1999 Sep 30
1
A little utility for checking socket settings
...could not test SO_RCVLOWAT, receive low-water mark * getsocketopts: could not test SO_SNDLOWAT, send low-water mark * getsocketopts: could not test SO_RCVTIMEO, receive timeout * getsocketopts: could not test SO_SNDTIMEO, send timeout * Default SO_RCVBUF, receive buffer size = 32768 * Default SO_ERROR, error status = 0 * Default SO_TYPE, socket type = 2 * Default TCP_MAXSEG, maximum segment size (mss) = 536 * Default TCP_NODELAY, send even tiny packets = 0 */ #include <stdio.h> #include <sys/types.h> /* for getuid() */ #include <unistd.h> #include <sys/socket.h> /* Fo...
2017 Jan 12
3
proposed change to ssh_connect_direct()
On Sat, Jan 7, 2017 at 2:30 PM, Peter Moody <mindrot at hda3.com> wrote: > so I spent a bit of time looking at this and it seems like the only > way to go, at least if I want to keep it in ssh_connect_direct(), is > to use pthreads. further, it seems like getting that accepted is > something of a long shot: Sorry, pthreads is a non-starter. I would have thought that using
2015 Apr 17
0
Wine release 1.7.41
...ashes after showing racing results screen (ToUnicodeEx should accept NULL pointer as keystate) 38361 Dead Space 2 (Steam) crashes at the <Please wait...Connecting> screen 38366 Outlast crashes with ARB shaders enabled 38372 Midnight Mysteries: The Salem Witch Trials crashes on start (SO_ERROR returns zero instead of ECONNREFUSED after connect attempt fails) 38387 Multiple .NET 4.x WPF applications abort with 'Unrecoverable system error' in Win7 mode (dwrite font family resolution must be case-insentive) 38410 ws2_32 fails compile without IPX ------------------------------...
2019 Mar 08
1
Dovecot v2.3.5 released
On 7.3.2019 23.37, A. Schulze via dovecot wrote: > > Am 07.03.19 um 17:33 schrieb Aki Tuomi via dovecot: > >>> test-http-client-errors.c:2989: Assert failed: FALSE >>> connection timed out ................................................. : FAILED > Hello Aki, > >> Are you running with valgrind or on really slow system? > I'm not aware my buildsystem
2012 Oct 22
1
[PATCH] Implement remote dynamic TCP forwarding
...x; + + FD_SET(c->sock, writeset); + } +} + +static void +channel_post_rdynamic(Channel *c, fd_set *readset, fd_set *writeset) +{ + if (c->sock < 0) + return; + if (FD_ISSET(c->sock, writeset)) { + int err = 0; + socklen_t sz = sizeof(err); + + if (getsockopt(c->sock, SOL_SOCKET, SO_ERROR, &err, &sz) < 0) { + err = errno; + error("getsockopt SO_ERROR failed"); + } + if (err == 0) + c->type = SSH_CHANNEL_OPEN; + else { + /* Try next address, if any */ + int sock; + if ((sock = connect_next(&c->connect_ctx)) > 0) { + close(c->sock...
2019 Jun 29
0
[libnbd PATCH 2/6] generator: Allow DEAD state actions to run
...agle (fd); @@ -70,7 +70,7 @@ disable_nagle (int sock) if (errno != EINPROGRESS) { SET_NEXT_STATE (%.DEAD); set_error (errno, "connect"); - return -1; + return 0; } } return 0; @@ -83,7 +83,7 @@ disable_nagle (int sock) SOL_SOCKET, SO_ERROR, &status, &len) == -1) { SET_NEXT_STATE (%.DEAD); set_error (errno, "getsockopt: SO_ERROR"); - return -1; + return 0; } /* This checks the status of the original connect call. */ if (status == 0) { @@ -93,7 +93,7 @@ disable_nagle (int sock) else {...
2002 May 22
0
[PATCH] connect() timeout
...setsz); + FD_SET(sockfd, fdset); + tv.tv_sec = timeout; + tv.tv_usec = 0; + rc=select(sockfd+1, NULL, fdset, NULL, &tv); + + switch(rc) { + case 0: + errno = ETIMEDOUT; + case -1: + return -1; + break; + case 1: + optval = 0; + optlen = sizeof(optval); + if (getsockopt(sockfd, SOL_SOCKET, SO_ERROR, &optval, &optlen) == -1) + return -1; + if (optval != 0) + { + errno = optval; + return -1; + } + return 0; + + default: + /* Should not occur */ + return -1; + break; + } + + return -1; + +} + /* * Opens a TCP/IP connection to the remote server on the given host. * The a...
2015 Nov 05
0
Is it possible to retrieve Non blocking socket writeable status of a unix channel device ?
...ck); return(1); } else tv.tv_sec = 15; tv.tv_usec = 0; FD_ZERO(&myset); FD_SET(sock, &myset); if (select(sock+1, NULL, &myset, NULL, &tv) > 0) { len = sizeof(int); getsockopt(sock, SOL_SOCKET, SO_ERROR, (void*)(&result), &len); if (result) { fprintf(stderr, "Error in connection() %d - %s\n", result, strerror(result)); return(1); } else { if(FD_ISSET(sock,&myset)) fprintf(stder...
2009 Jul 06
1
Nonblocking connect is not proprly checked in poll implementation
...en_t size = sizeof val; check.fd = sock; check.events = POLLOUT; switch (poll (&check, 1, timeout*1000)) { case 0: return SOCK_TIMEOUT; + default: + /* on windows getsockopt.val is defined as char* */ + if (getsockopt(sock, SOL_SOCKET, SO_ERROR, (void*) &val, &size) == 0) + { + if (val == 0) + return 1; + sock_set_error (val); + } + /* fall through */ case -1: if (sock_recoverable (sock_error())) return 0;...
2014 Feb 22
0
Dovecot / Postfix and the quota-status
...ix trace INET Call ************************** connect(21, {sa_family=AF_INET, sin_port=htons(12340), sin_addr=inet_addr("127.0.0.1")}, 16) = -1 EINPROGRESS (Operation now in progress) poll([{fd=21, events=POLLOUT}], 1, 100000) = 1 ([{fd=21, revents=POLLOUT}]) getsockopt(21, SOL_SOCKET, SO_ERROR, [0], [4]) = 0 fcntl(21, F_GETFL) = 0x802 (flags O_RDWR|O_NONBLOCK) fcntl(21, F_SETFL, O_RDWR) = 0 fcntl(21, F_GETFD) = 0 fcntl(21, F_SETFD, FD_CLOEXEC) = 0 epoll_ctl(11, EPOLL_CTL_ADD, 21, {EPOLLIN, {u32=21}}) = 0 poll([{fd=21, event...
2018 Feb 23
6
RFC 8305 Happy Eyeballs in OpenSSH
...ai_addr, ai->ai_addrlen, + ntop, sizeof(ntop), + strport, sizeof(strport), + NI_NUMERICHOST|NI_NUMERICSERV) != 0) { + oerrno = errno; + error("%s: getnameinfo failed", __func__); + errno = oerrno; return -1; - - /* Completed or failed */ - if (getsockopt(sockfd, SOL_SOCKET, SO_ERROR, &optval, &optlen) == -1) { - debug("getsockopt: %s", strerror(errno)); + } + debug("Connecting to %.200s [%.100s] port %s.", + host, ntop, strport); + /* Create a socket for connecting */ + sock = ssh_create_socket(needpriv, ai); + if (sock < 0) { + /* Any er...
2003 Apr 15
0
Connect timeout patch
...setsz); + FD_SET(sockfd, fdset); + tv.tv_sec = timeout; + tv.tv_usec = 0; + rc=select(sockfd+1, NULL, fdset, NULL, &tv); + + switch(rc) { + case 0: + errno = ETIMEDOUT; + case -1: + return -1; + break; + case 1: + optval = 0; + optlen = sizeof(optval); + if (getsockopt(sockfd, SOL_SOCKET, SO_ERROR, &optval, &optlen) == -1) + return -1; + if (optval != 0) + { + errno = optval; + return -1; + } + return 0; + + default: + /* Should not occur */ + return -1; + break; + } + return -1; +} + /* * Opens a TCP/IP connection to the remote server on the given host. * The addre...
2002 Apr 03
1
[PATCH] connect() timeout
...OGRESS) + return -1; + + FD_ZERO(&fds); + FD_SET(sockfd, &fds); + tv.tv_sec = timeout; + tv.tv_usec = 0; + rc=select(sockfd+1, NULL, &fds, NULL, &tv); + + switch(rc) { + case 0: + errno = ETIMEDOUT; + case -1: + return -1; + break; + case 1: + if (getsockopt(sockfd, SOL_SOCKET, SO_ERROR, &optval, &optlen) == -1) + return -1; + if (optval != 0) + { + errno = optval; + return -1; + } + return 0; + + default: + /* Should not occur */ + return -1; + break; + } + + return -1; + +} + /* * Opens a TCP/IP connection to the remote server on the given host. * The a...
2002 Oct 17
0
[PATCH] connect() timeout for OpenSSH-3.5p1
...setsz); + FD_SET(sockfd, fdset); + tv.tv_sec = timeout; + tv.tv_usec = 0; + rc=select(sockfd+1, NULL, fdset, NULL, &tv); + + switch(rc) { + case 0: + errno = ETIMEDOUT; + case -1: + return -1; + break; + case 1: + optval = 0; + optlen = sizeof(optval); + if (getsockopt(sockfd, SOL_SOCKET, SO_ERROR, &optval, &optlen) == -1) + return -1; + if (optval != 0) + { + errno = optval; + return -1; + } + return 0; + + default: + /* Should not occur */ + return -1; + break; + } + return -1; +} + /* * Opens a TCP/IP connection to the remote server on the given host. * The addre...
2017 Jun 17
1
client reconnect fails (was gluster heal entry reappears)
...u32=4, u64=4810363371524}}) = 0 ... 4550 <... epoll_wait resumed> {{EPOLLIN|EPOLLOUT|EPOLLERR|EPOLLHUP, {u32=2, u64=4952097292290}}}, 1, -1) = 1 4548 <... epoll_wait resumed> {{EPOLLIN|EPOLLOUT|EPOLLERR|EPOLLHUP, {u32=4, u64=4810363371524}}}, 1, -1) = 1 4550 getsockopt(5, SOL_SOCKET, SO_ERROR, <unfinished ...> 4548 getsockopt(7, SOL_SOCKET, SO_ERROR, <unfinished ...> 4550 <... getsockopt resumed> [110], [4]) = 0 4548 <... getsockopt resumed> [110], [4]) = 0 4550 shutdown(5, SHUT_RDWR <unfinished ...> 4548 shutdown(7, SHUT_RDWR <unfinished ...>...
2004 Aug 06
0
Submission: Patch to libshout/sock.c for MacOSX
...return sockfd; } else { #ifdef _WIN32 if (WSAGetLastError() == WSAEINPROGRESS) { #else if (!sock_recoverable(errno)) { #endif sock_close(sockfd); return SOCKET_ERROR; } } if (select(sockfd + 1, NULL, &wfds, NULL, &tv)) { retval = getsockopt (sockfd, SOL_SOCKET, SO_ERROR, (void *)&val, (socklen_t *)&valsize); if ((retval == 0) && (val == 0)) { sock_set_blocking(sockfd, SOCK_BLOCK); return sockfd; } else { sock_close(sockfd); return SOCKET_ERROR; } } else { sock_close(sockfd); return SOCKET_ERROR; } } else {...
2019 Oct 24
3
winbind : suspend nightmare
On Wed, 2019-10-23 at 22:21 -0700, Jeremy Allison wrote: > On Wed, Oct 23, 2019 at 11:58:33PM +0000, Jon Gerdes wrote: > > winbind has a concept of offline and online but I don't know what > > that > > is, nor how nss works with it. I've tried using smbcontrol to tell > > winbind it is offline or online but that does not seem to work. > > Restarting
2002 Jan 26
5
[PATCH] Connect timeout
The attached patch adds a new 'ConnectTimeout' option (man page updated in patch) to avoid wasting time when the target host is down. I needed that because I was using rsync/rdist over ssh for massive files update and the default connect() took too long for my purpose. The patch was tested on Linux only, but I used a similar one for ssh 1.2.XX on Linux, Solaris and HP-UX without
2008 Sep 30
1
Problem compiling tinc-1.0.8 on gcc-2.95
...c->status.remove) + if(c->status.st.remove) continue; if(FD_ISSET(c->socket, readset)) { - if(c->status.connecting) { - c->status.connecting = false; + if(c->status.st.connecting) { + c->status.st.connecting = false; getsockopt(c->socket, SOL_SOCKET, SO_ERROR, &result, &len); if(!result) @@ -324,14 +324,14 @@ } if(!receive_meta(c)) { - terminate_connection(c, c->status.active); + terminate_connection(c, c->status.st.active); continue; } } if(FD_ISSET(c->socket, writeset)) { if(!flush_meta(c))...
2017 Jun 29
3
Some bricks are offline after restart, how to bring them online gracefully?
Hi all, Gluster and Ganesha are amazing. Thank you for this great work! I?m struggling with one issue and I think that you might be able to help me. I spent some time by playing with Gluster and Ganesha and after I gain some experience I decided that I should go into production but I?m still struggling with one issue. I have 3x node CentOS 7.3 with the most current Gluster and Ganesha from