Changeset 4434:ff895ca43976 in roaraudio


Ignore:
Timestamp:
10/09/10 15:07:17 (8 years ago)
Author:
phi
Branch:
default
Message:

added support to print all possible values from the info struct

File:
1 edited

Legend:

Unmodified
Added
Removed
  • roarclients/roarctl.c

    r4432 r4434  
    201201#endif 
    202202 
     203#define _pm(m,n) if ( info->m != NULL ) printf("Server %-15s: %s\n", (n), (info->m)); 
    203204void server_info (struct roar_connection * con) { 
    204205 struct roar_server_info * info = roar_server_info(con); 
     
    209210 } 
    210211 
    211  if ( info->version != NULL ) 
    212   printf("Stream version        : %s\n", info->version); 
     212 _pm(version, "version"); 
     213 _pm(location, "location"); 
     214 _pm(description, "description"); 
     215 _pm(contact, "contact"); 
     216 _pm(serial, "serial"); 
     217 _pm(address, "address"); 
     218 _pm(uiurl, "UI URL"); 
     219 _pm(un.sysname, "System sysname"); 
     220 _pm(un.release, "System release"); 
     221 _pm(un.nodename, "System nodename"); 
     222 _pm(un.machine, "System machine"); 
    213223 
    214224 roar_server_info_free(info); 
    215225} 
     226#undef _pm 
    216227 
    217228void server_oinfo (struct roar_connection * con) { 
Note: See TracChangeset for help on using the changeset viewer.