mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	win32: Check WSAGetLastError() in pa_is_unix_socket_stale.
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/360>
This commit is contained in:
		
							parent
							
								
									68cb06b5fd
								
							
						
					
					
						commit
						4e5786ffdd
					
				
					 1 changed files with 5 additions and 0 deletions
				
			
		| 
						 | 
					@ -239,8 +239,13 @@ int pa_unix_socket_is_stale(const char *fn) {
 | 
				
			||||||
    sa.sun_path[sizeof(sa.sun_path) - 1] = 0;
 | 
					    sa.sun_path[sizeof(sa.sun_path) - 1] = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (connect(fd, (struct sockaddr*) &sa, sizeof(sa)) < 0) {
 | 
					    if (connect(fd, (struct sockaddr*) &sa, sizeof(sa)) < 0) {
 | 
				
			||||||
 | 
					#if !defined(OS_IS_WIN32)
 | 
				
			||||||
        if (errno == ECONNREFUSED)
 | 
					        if (errno == ECONNREFUSED)
 | 
				
			||||||
            ret = 1;
 | 
					            ret = 1;
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
 | 
					        if (WSAGetLastError() == WSAECONNREFUSED)
 | 
				
			||||||
 | 
					            ret = 1;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
    } else
 | 
					    } else
 | 
				
			||||||
        ret = 0;
 | 
					        ret = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue