mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	Minor fixes for the way Windows handles sockets.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@760 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
		
							parent
							
								
									e1513ce684
								
							
						
					
					
						commit
						1d512470be
					
				
					 2 changed files with 12 additions and 4 deletions
				
			
		| 
						 | 
					@ -187,8 +187,13 @@ static int do_connect(pa_socket_client *c, const struct sockaddr *sa, socklen_t
 | 
				
			||||||
    pa_make_nonblock_fd(c->fd);
 | 
					    pa_make_nonblock_fd(c->fd);
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    if ((r = connect(c->fd, sa, len)) < 0) {
 | 
					    if ((r = connect(c->fd, sa, len)) < 0) {
 | 
				
			||||||
 | 
					#ifdef OS_IS_WIN32
 | 
				
			||||||
 | 
					        if (WSAGetLastError() != EWOULDBLOCK) {
 | 
				
			||||||
 | 
					            pa_log_debug(__FILE__": connect(): %d", WSAGetLastError());
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
        if (errno != EINPROGRESS) {
 | 
					        if (errno != EINPROGRESS) {
 | 
				
			||||||
            /*pa_log(__FILE__": connect(): %s", strerror(errno));*/
 | 
					            pa_log_debug(__FILE__": connect(): %s (%d)", strerror(errno), errno);
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
            return -1;
 | 
					            return -1;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -474,8 +479,10 @@ pa_socket_client* pa_socket_client_new_string(pa_mainloop_api *m, const char*nam
 | 
				
			||||||
                struct sockaddr_in s;
 | 
					                struct sockaddr_in s;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                /* FIXME: PF_INET6 support */
 | 
					                /* FIXME: PF_INET6 support */
 | 
				
			||||||
                if (hints.ai_family != PF_INET)
 | 
					                if (hints.ai_family == PF_INET6) {
 | 
				
			||||||
 | 
					                    pa_log_error(__FILE__": IPv6 is not supported on Windows");
 | 
				
			||||||
                    goto finish;
 | 
					                    goto finish;
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                host = gethostbyname(a.path_or_host);
 | 
					                host = gethostbyname(a.path_or_host);
 | 
				
			||||||
                if (!host) {
 | 
					                if (!host) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -13,6 +13,7 @@
 | 
				
			||||||
#define ETIMEDOUT       WSAETIMEDOUT
 | 
					#define ETIMEDOUT       WSAETIMEDOUT
 | 
				
			||||||
#define ECONNREFUSED    WSAECONNREFUSED
 | 
					#define ECONNREFUSED    WSAECONNREFUSED
 | 
				
			||||||
#define EHOSTUNREACH    WSAEHOSTUNREACH
 | 
					#define EHOSTUNREACH    WSAEHOSTUNREACH
 | 
				
			||||||
 | 
					#define EWOULDBLOCK     WSAEWOULDBLOCK
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue