Changeset 2043:aacacd9f23d5 in roaraudio


Ignore:
Timestamp:
06/22/09 19:44:38 (15 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

added roar_get_connection_vio(), added a simple error check

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • include/libroar/basic.h

    r1660 r2043  
    6363int roar_connect    (struct roar_connection * con, char * server); 
    6464int roar_connect_fh (struct roar_connection * con, int fh); 
    65 int roar_get_connection_fh (struct roar_connection * con); 
     65int roar_get_connection_fh  (struct roar_connection * con); 
     66int roar_get_connection_vio (struct roar_connection * con, struct roar_vio_calls * vio); 
    6667int roar_disconnect (struct roar_connection * con); 
    6768 
  • libroar/basic.c

    r2014 r2043  
    212212 
    213213int roar_get_connection_fh (struct roar_connection * con) { 
     214 if ( con == NULL ) 
     215  return -1; 
     216 
    214217 return con->__fh; 
     218} 
     219 
     220int roar_get_connection_vio (struct roar_connection * con, struct roar_vio_calls * vio) { 
     221 if ( con == NULL || vio == NULL ) 
     222  return -1; 
     223 
     224 return roar_vio_open_fh_socket(vio, roar_get_connection_fh(con)); 
    215225} 
    216226 
Note: See TracChangeset for help on using the changeset viewer.