Changeset 5279:bb3ff1f2be28 in roaraudio for roard
- Timestamp:
- 11/21/11 18:28:31 (12 years ago)
- Branch:
- default
- Phase:
- public
- Location:
- roard
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
roard/include/roard.h
r5194 r5279 202 202 char * location; 203 203 char * description; 204 char * contact; 205 char * serial; 206 char * uiurl; 204 207 size_t jumbo_mtu; 205 208 int memlock_level; -
roard/req.c
r5216 r5279 750 750 struct roar_server_info info; 751 751 uint16_t * d16; 752 #ifdef ROAR_HAVE_GETHOSTID 753 long hostid; 754 char hostidbuf[64]; 755 #endif 752 756 753 757 if ( mes->datalen != 4 ) … … 771 775 } 772 776 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 773 785 if ( !!strcmp(g_config->location, CONF_DEF_STRING) ) 774 786 info.location = g_config->location; 775 787 776 788 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; 778 794 779 795 #ifdef ROAR_HAVE_UNAME -
roard/roard.c
r5275 r5279 230 230 " --location LOC - Set lion readable location of server\n" 231 231 " --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" 232 237 #ifdef SUPPORT_PIDFILE 233 238 " --pidfile PIDFILE - Write a pidfile at PIDFILE\n" … … 513 518 g_config->location = CONF_DEF_STRING; 514 519 g_config->description = CONF_DEF_STRING; 520 g_config->contact = NULL; 521 g_config->serial = NULL; 522 g_config->uiurl = NULL; 515 523 516 524 g_config->memlock_level = -1; … … 1657 1665 _CKHAVEARGS(1); 1658 1666 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]; 1659 1676 } else if ( strcmp(k, "--pidfile") == 0 ) { 1660 1677 _CKHAVEARGS(1);
Note: See TracChangeset
for help on using the changeset viewer.