Changeset 4934:a88414aa5705 in roaraudio for roard/roard.c


Ignore:
Timestamp:
05/09/11 01:39:41 (13 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

Added support for role based handling in roard (Closes: #49)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • roard/roard.c

    r4924 r4934  
    248248        "                         a flag as default or remove it from the default\n" 
    249249       ); 
     250 printf("\nStream Options:\n\n"); 
     251 printf( 
     252        " --list-rolestack      - Show the current role stack\n" 
     253        " --rolestack-push R:A  - Add a rule for role R with action A on top\n" 
     254        "                         of the role stack.\n" 
     255       ); 
    250256 
    251257 printf("\nOutput Options:\n\n"); 
     
    13321338 struct roar_audio_info sa, max_sa; 
    13331339 struct roard_config config; 
     1340 const struct rolestack * rolestack; 
    13341341#ifdef ROAR_HAVE_FORK 
    13351342 int    daemon       = 0; 
     
    14611468#endif 
    14621469 
     1470 rolestack_init(); 
     1471 
    14631472 if ( auth_init() == -1 ) { 
    14641473  ROAR_ERR("Can not init auth subsystem!"); 
     
    17121721    return 1; 
    17131722   } 
     1723 
     1724  } else if ( strcmp(k, "--list-rolestack") == 0 ) { 
     1725   print_rolestack(); 
     1726   return 0; 
     1727  } else if ( strcmp(k, "--rolestack-push") == 0 ) { 
     1728   _CKHAVEARGS(1); 
     1729  if ( (rolestack = rolestack_parse(argv[++i])) == NULL ) { 
     1730   ROAR_ERR("Can not parse rolestack request: %s", roar_error2str(roar_error)); 
     1731  } else { 
     1732   if ( rolestack_push(rolestack) == -1 ) { 
     1733    ROAR_ERR("Can not push request to rolestack: %s", roar_error2str(roar_error)); 
     1734   } 
     1735  } 
    17141736 
    17151737  } else if ( strcmp(k, "--list-aiprofiles") == 0 ) { 
Note: See TracChangeset for help on using the changeset viewer.