Changeset 1781:43f928932e6c in roaraudio


Ignore:
Timestamp:
05/19/09 20:12:24 (15 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

ping requires gettimeofday()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • roarclients/roarctl.c

    r1631 r1781  
    4848        "  help                    - Show this help\n" 
    4949        "  sleep TIME              - Sleeps for TIME seconds\n" 
     50#ifdef ROAR_HAVE_GETTIMEOFDAY 
    5051        "  ping  NUM               - Do NUM pings using NOOP commands\n" 
     52#endif 
    5153        "\n" 
    5254        "  standby, off            - Go into standby mode\n" 
     
    8486} 
    8587 
     88#ifdef ROAR_HAVE_GETTIMEOFDAY 
    8689int ping (struct roar_connection * con, int num) { 
    8790 struct timeval         try, ans; 
     
    129132 return 0; 
    130133} 
     134#endif 
    131135 
    132136void server_oinfo (struct roar_connection * con) { 
     
    671675 
    672676  } else if ( !strcmp(k, "ping") ) { 
     677#ifdef ROAR_HAVE_GETTIMEOFDAY 
    673678   if ( ping(&con, atoi(argv[++i])) == -1 ) { 
    674679    fprintf(stderr, "Error: can not ping\n"); 
    675680   } 
     681#else 
     682    fprintf(stderr, "Error: ping not supported.\n"); 
     683    i++; 
     684#endif 
    676685 
    677686  } else if ( !strcmp(k, "standby") || !strcmp(k, "off") ) { 
Note: See TracChangeset for help on using the changeset viewer.