Changeset 5267:b48fff0bf120 in roaraudio for libroar/basic.c


Ignore:
Timestamp:
11/15/11 12:57:49 (12 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

experimental support to connect to roard via PTYs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libroar/basic.c

    r5240 r5267  
    5959 struct roar_server * list; 
    6060 int workarounds_store; 
     61#endif 
     62#if defined(ROAR_HAVE_STAT) && defined(ROAR_HAVE_H_SYS_STAT) 
     63 struct stat sockstat; 
    6164#endif 
    6265 
     
    239242   user_sock[i] = ':'; 
    240243  } else { 
     244#if defined(ROAR_HAVE_STAT) && defined(ROAR_HAVE_H_SYS_STAT) 
     245   if ( user_sock[0] == '/' ) { 
     246    if ( stat(user_sock, &sockstat) == 0 ) { 
     247     if ( S_ISCHR(sockstat.st_mode) ) { 
     248      return open(user_sock, O_RDWR|O_NOCTTY, 0666); 
     249     } 
     250    } 
     251   } 
     252#endif 
    241253   fh = roar_socket_connect(user_sock, ROAR_DEFAULT_PORT); 
    242254  } 
Note: See TracChangeset for help on using the changeset viewer.