Changeset 5279:bb3ff1f2be28 in roaraudio for roard


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.

Location:
roard
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • roard/include/roard.h

    r5194 r5279  
    202202 char * location; 
    203203 char * description; 
     204 char * contact; 
     205 char * serial; 
     206 char * uiurl; 
    204207 size_t jumbo_mtu; 
    205208 int memlock_level; 
  • roard/req.c

    r5216 r5279  
    750750 struct roar_server_info info; 
    751751 uint16_t * d16; 
     752#ifdef ROAR_HAVE_GETHOSTID 
     753 long hostid; 
     754 char hostidbuf[64]; 
     755#endif 
    752756 
    753757 if ( mes->datalen != 4 ) 
     
    771775   } 
    772776 
     777   info.license = "GPL-3.0"; 
     778 
     779#ifdef ROAR_HAVE_GETHOSTID 
     780   hostid = gethostid(); 
     781   snprintf(hostidbuf, sizeof(hostidbuf), sizeof(long) == 8 ? "0x%.16lx" : "0x%.8lx", hostid); 
     782   info.hostid = hostidbuf; 
     783#endif 
     784 
    773785   if ( !!strcmp(g_config->location, CONF_DEF_STRING) ) 
    774786    info.location = g_config->location; 
    775787 
    776788   if ( !!strcmp(g_config->description, CONF_DEF_STRING) ) 
    777    info.description = g_config->description; 
     789    info.description = g_config->description; 
     790 
     791   info.contact = g_config->contact; 
     792   info.serial  = g_config->serial; 
     793   info.uiurl   = g_config->uiurl; 
    778794 
    779795#ifdef ROAR_HAVE_UNAME 
  • roard/roard.c

    r5275 r5279  
    230230        " --location  LOC       - Set lion readable location of server\n" 
    231231        " --description  DESC   - Set lion readable description of server\n" 
     232        " --contact CONTACT     - Set contact for this server\n" 
     233        " --serial SERIAL       - Set serial for this device or server\n" 
     234        "                         (for embedded devices only)\n" 
     235        " --uiurl UIURL         - Set URL for userinterface of this device or server\n" 
     236        "                         (for embedded devices only)\n" 
    232237#ifdef SUPPORT_PIDFILE 
    233238        " --pidfile PIDFILE     - Write a pidfile at PIDFILE\n" 
     
    513518 g_config->location    = CONF_DEF_STRING; 
    514519 g_config->description = CONF_DEF_STRING; 
     520 g_config->contact     = NULL; 
     521 g_config->serial      = NULL; 
     522 g_config->uiurl       = NULL; 
    515523 
    516524 g_config->memlock_level = -1; 
     
    16571665   _CKHAVEARGS(1); 
    16581666   g_config->description = argv[++i]; 
     1667  } else if ( strcmp(k, "--contact") == 0 ) { 
     1668   _CKHAVEARGS(1); 
     1669   g_config->contact = argv[++i]; 
     1670  } else if ( strcmp(k, "--serial") == 0 ) { 
     1671   _CKHAVEARGS(1); 
     1672   g_config->serial = argv[++i]; 
     1673  } else if ( strcmp(k, "--uiurl") == 0 ) { 
     1674   _CKHAVEARGS(1); 
     1675   g_config->uiurl = argv[++i]; 
    16591676  } else if ( strcmp(k, "--pidfile") == 0 ) { 
    16601677   _CKHAVEARGS(1); 
Note: See TracChangeset for help on using the changeset viewer.