Changeset 1511:27353ecb0db8 in roaraudio


Ignore:
Timestamp:
04/04/09 22:05:44 (15 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

got urls without a port working, too. use / as filename if non is gigen on HTTP streams.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • roarclients/roarradio.c

    r801 r1511  
    104104   } 
    105105 
    106    if ( (in = roar_socket_connect(host, port)) == -1 ) { 
    107     ROAR_ERR("can not connect to remote server %s (port %i): %s", host, port, strerror(errno)); 
    108     return 0; 
     106   if ( !*file ) { 
     107    file = "/"; 
     108 
     109    if ( (in = roar_socket_connect(host, port)) == -1 ) { 
     110     ROAR_ERR("can not connect to remote server %s (port %i): %s", host, port, strerror(errno)); 
     111     return 0; 
     112    } 
     113   } else { 
     114    *file = 0; 
     115 
     116    if ( (in = roar_socket_connect(host, port)) == -1 ) { 
     117     ROAR_ERR("can not connect to remote server %s (port %i): %s", host, port, strerror(errno)); 
     118     return 0; 
     119    } 
     120 
     121    *file = '/'; 
    109122   } 
    110123 
Note: See TracChangeset for help on using the changeset viewer.