Changeset 2039:c2c07922c559 in roaraudio


Ignore:
Timestamp:
06/21/09 17:55:35 (15 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

added a error message and some debug ones

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libroar/socket.c

    r1768 r2039  
    577577#if defined(ROAR_HAVE_IPV4) || defined(ROAR_HAVE_IPV6) 
    578578 
     579  ROAR_DBG("roar_socket_open(*) = ?"); 
     580 
    579581  roar_socket_win32_init(); // we need to do this early as gethostbyname() requires this. 
    580582 
     
    591593   socket_addr.in.sin_port   = ROAR_HOST2NET16(port); 
    592594 
    593    fh = roar_socket_new_tcp(); 
     595  fh = roar_socket_new_tcp(); 
     596 
     597  if ( fh == -1 ) { 
     598   ROAR_ERR("roar_socket_open(*): Can\'t create TCP socket: %s", strerror(errno)); 
     599   return -1; 
     600  } 
     601 
     602  ROAR_DBG("roar_socket_open(*) = ?"); 
    594603 
    595604   if ( mode_func(fh, (struct sockaddr *)&socket_addr.in, sizeof(struct sockaddr_in)) == -1 ) { 
Note: See TracChangeset for help on using the changeset viewer.