Changeset 5577:5d9bed8d3bc6 in roaraudio for roard/roard.c


Ignore:
Timestamp:
07/21/12 16:55:08 (12 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

delay display of --list-proto until all plugins are loaded. Also indicate if protocol is a plugin based implementation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • roard/roard.c

    r5567 r5577  
    4040 
    4141#include "roard.h" 
     42 
     43enum metaaction { 
     44 MA_ACTION, 
     45 MA_LIST_PROTO 
     46}; 
    4247 
    4348enum action { 
     
    14041409#endif 
    14051410#ifdef ROAR_HAVE_MAIN_ARGS 
     1411 enum metaaction metaaction = MA_ACTION; 
    14061412 enum action action = START; 
    14071413 int i; 
     
    21952201 
    21962202  } else if ( strcmp(k, "--list-proto") == 0 ) { 
    2197    print_protolist(print_format); 
    2198    return 0; 
     2203   metaaction = MA_LIST_PROTO; 
    21992204 
    22002205  } else if ( strcmp(k, "-t") == 0 || strcmp(k, "--tcp") == 0 ) { 
     
    23152320 
    23162321#ifdef ROAR_HAVE_MAIN_ARGS 
     2322 if ( metaaction != MA_ACTION ) 
     2323  action = START; 
     2324 
    23172325 switch (action) { 
    23182326  case START: 
     
    24502458 } 
    24512459 
     2460#ifdef ROAR_HAVE_MAIN_ARGS 
     2461 // check meta action now as everything is set up. 
     2462 switch (metaaction) { 
     2463  case MA_ACTION: /* noop */; break; 
     2464  case MA_LIST_PROTO: 
     2465    print_protolist(print_format); 
     2466    return 0; 
     2467   break; 
     2468 } 
     2469#endif 
     2470 
    24522471 // we should handle this on microcontrollers, too. 
    24532472#if !defined(ROAR_TARGET_MICROCONTROLLER) && !defined(ROAR_TARGET_WIN32) 
Note: See TracChangeset for help on using the changeset viewer.