Changeset 4435:32e641dd7526 in roaraudio


Ignore:
Timestamp:
10/09/10 15:17:25 (14 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

use data from server_info for devenum

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libroar/enumdev.c

    r4414 r4435  
    4040static int _test_server(struct roar_server * c, int flags) { 
    4141 struct roar_connection con; 
     42 struct roar_server_info * info; 
     43 
    4244 if ( c->server == NULL ) 
    4345  return -1; 
     
    4850 if ( roar_connect(&con, (char*)c->server) == -1 ) 
    4951  return -1; 
     52 
     53 info = roar_server_info(&con); 
     54 if ( info != NULL ) { 
     55  if ( info->location != NULL ) 
     56   c->location = roar_mm_strdup(info->location); 
     57 
     58  if ( info->description != NULL ) 
     59   c->description = roar_mm_strdup(info->description); 
     60 
     61  roar_server_info_free(info); 
     62 } 
    5063 
    5164 roar_disconnect(&con); 
Note: See TracChangeset for help on using the changeset viewer.