Changeset 5387:ec00c0a72024 in roaraudio for roarclients
- Timestamp:
- 01/16/12 18:33:43 (12 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
roarclients/roarctl.c
r5386 r5387 127 127 "\n" 128 128 " serverinfo - Gets general information about the server\n" 129 " libinfo - Gets general information about the library (libroar)\n" 129 130 " servertime - Gets server's time\n" 130 131 " serveroinfo - Gets Information about server output\n" … … 270 271 #endif 271 272 272 #define _pm(m,n) if ( info->m != NULL ) printf( "Server %-15s: %s\n", (n), (info->m));273 #define _pm(m,n) if ( info->m != NULL ) printf(con != NULL ? "Server %-15s: %s\n" : "Library %-14s: %s\n", (n), (info->m)); 273 274 void server_info (struct roar_connection * con) { 274 struct roar_server_info * info = roar_server_info(con);275 struct roar_server_info * info = con != NULL ? roar_server_info(con) : roar_library_info(); 275 276 long hostid; 276 277 … … 294 295 295 296 if ( hostid ) { 296 printf("Server %-15s: %s (%li.%li.%li.%li)\n", "HostID", info->hostid, 297 printf(con != NULL ? "Server %-15s: %s (%li.%li.%li.%li)\n" 298 : "Library %-14s: %s (%li.%li.%li.%li)\n", "HostID", info->hostid, 297 299 ((hostid & 0x00FF0000UL) >> 16UL), 298 300 ((hostid & 0xFF000000UL) >> 24UL), … … 301 303 ); 302 304 } else { 303 printf("Server %-15s: %s\n", "HostID", info->hostid);305 _pm(hostid, "HostID"); 304 306 } 305 307 } … … 1310 1312 } else if ( !strcmp(k, "serverinfo") ) { 1311 1313 server_info(&con); 1314 } else if ( !strcmp(k, "libinfo") ) { 1315 server_info(NULL); 1312 1316 } else if ( !strcmp(k, "servertime") ) { 1313 1317 server_time(&con);
Note: See TracChangeset
for help on using the changeset viewer.