Changeset 5279:bb3ff1f2be28 in roaraudio for roarclients


Ignore:
Timestamp:
11/21/11 18:28:31 (12 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

added support to hostid and license to server info struct, added support for contact, serial and uiurl ITST to roard.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • roarclients/roarctl.c

    r5238 r5279  
    269269void server_info (struct roar_connection * con) { 
    270270 struct roar_server_info * info = roar_server_info(con); 
     271 long hostid; 
    271272 
    272273 if ( info == NULL ) { 
     
    275276 } 
    276277 
    277  _pm(version, "version"); 
    278  _pm(location, "location"); 
    279  _pm(description, "description"); 
    280  _pm(contact, "contact"); 
    281  _pm(serial, "serial"); 
    282  _pm(address, "address"); 
     278 _pm(version, "Version"); 
     279 _pm(location, "Location"); 
     280 _pm(description, "Description"); 
     281 _pm(contact, "Contact"); 
     282 _pm(serial, "Serial"); 
     283 _pm(address, "Address"); 
    283284 _pm(uiurl, "UI URL"); 
     285 _pm(license, "License"); 
     286// _pm(hostid, "HostID"); 
     287 if ( info->hostid != NULL ) { 
     288  if ( sscanf(info->hostid, "0x%lx", &hostid) != 1 ) 
     289   hostid = 0; 
     290 
     291  if ( hostid ) { 
     292   printf("Server %-15s: %s (%li.%li.%li.%li)\n", "HostID", info->hostid, 
     293           ((hostid & 0x00FF0000UL) >> 16UL), 
     294           ((hostid & 0xFF000000UL) >> 24UL), 
     295           ((hostid & 0x000000FFUL) >>  0UL), 
     296           ((hostid & 0x0000FF00UL) >>  8UL) 
     297         ); 
     298  } else { 
     299   printf("Server %-15s: %s\n", "HostID", info->hostid); 
     300  } 
     301 } 
    284302 _pm(un.sysname, "System sysname"); 
    285303 _pm(un.release, "System release"); 
Note: See TracChangeset for help on using the changeset viewer.