Changeset 4421:f04e16af6d2a in roaraudio


Ignore:
Timestamp:
10/07/10 15:58:59 (8 years ago)
Author:
phi
Branch:
default
Message:

added support to list descriptions in SLP

Location:
roard
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • roard/include/roard.h

    r4359 r4421  
    185185 } streams[ROAR_DIR_DIRIDS]; 
    186186 char * location; 
     187 char * description; 
    187188 size_t jumbo_mtu; 
    188189 int memlock_level; 
  • roard/roard.c

    r4418 r4421  
    165165        " --sysclocksync        - calculate exact sample rate using the system clock\n" 
    166166        " --location  LOC       - Set lion readable location of server\n" 
     167        " --description  DESC   - Set lion readable description of server\n" 
    167168#ifdef SUPPORT_PIDFILE 
    168169        " --pidfile PIDFILE     - Write a pidfile at PIDFILE\n" 
     
    436437 g_config->streams[ROAR_DIR_BIDIR   ].flags = ROAR_FLAG_ANTIECHO; 
    437438 
    438  g_config->location = "***default***"; 
     439 g_config->location    = "***default***"; 
     440 g_config->description = "***default***"; 
    439441 
    440442 g_config->memlock_level = -1; 
     
    13131315 char attr[1024] = ""; 
    13141316 char * location; 
     1317 char * description; 
    13151318 
    13161319 if ( sockname != NULL ) 
     
    13341337  } 
    13351338 
     1339  if ( SLPEscape(g_config->description, &description, SLP_FALSE) != SLP_OK ) { 
     1340   ROAR_ERR("Error using SLPEscape() on server location, really bad!"); 
     1341   SLPClose(hslp); 
     1342   return -1; 
     1343  } 
     1344 
    13361345  snprintf(attr, sizeof(attr), "(wave-rate=%i),(wave-channels=%i),(wave-bits=%i)," 
    13371346#ifndef ROAR_WITHOUT_DCOMP_LIGHT 
    13381347                               "(light-channels=%i)," 
    13391348#endif 
    1340                                "(location=%s)", 
     1349                               "(location=%s),(description=%s)", 
    13411350           g_sa->rate, g_sa->channels, g_sa->bits, 
    13421351#ifndef ROAR_WITHOUT_DCOMP_LIGHT 
    13431352           g_light_state.channels, 
    13441353#endif 
    1345            location 
     1354           location, description 
    13461355          ); 
    13471356 
     
    17011710   _CKHAVEARGS(1); 
    17021711   g_config->location = argv[++i]; 
     1712  } else if ( strcmp(k, "--description") == 0 ) { 
     1713   _CKHAVEARGS(1); 
     1714   g_config->description = argv[++i]; 
    17031715  } else if ( strcmp(k, "--pidfile") == 0 ) { 
    17041716   _CKHAVEARGS(1); 
Note: See TracChangeset for help on using the changeset viewer.