Changeset 3845:e5ba73155538 in roaraudio


Ignore:
Timestamp:
05/16/10 22:17:08 (14 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

only print optional infos in case we acctualy have the data

File:
1 edited

Legend:

Unmodified
Added
Removed
  • roarclients/roarctl.c

    r3790 r3845  
    237237   continue; 
    238238  } 
    239   printf("Client name           : %s\n", c.name); 
     239 
     240  if ( c.name[0] != '\0' ) 
     241   printf("Client name           : %s\n", c.name); 
    240242 
    241243  if ( roar_nnode_get_socktype(&(c.nnode)) != ROAR_SOCKET_TYPE_UNKNOWN ) { 
     
    245247  } 
    246248 
    247   if ( self_id != -1 && roar_nnode_cmp(&(self_client.nnode), &(c.nnode)) == 0 ) { 
    248    printf("Client PID            : %i(%s)\n", c.pid, proc_name(c.pid)); 
    249   } else {  
    250    printf("Client PID            : %i\n", c.pid); 
     249  if ( c.pid != -1 ) { 
     250   if ( self_id != -1 && roar_nnode_cmp(&(self_client.nnode), &(c.nnode)) == 0 ) { 
     251    printf("Client PID            : %i(%s)\n", c.pid, proc_name(c.pid)); 
     252   } else {  
     253    printf("Client PID            : %i\n", c.pid); 
     254   } 
    251255  } 
    252256  if ( c.uid != -1 ) { 
Note: See TracChangeset for help on using the changeset viewer.