Invert the meaning of the -e flag for listener
[ric-app/mc.git] / src / sidecars / listener / pipe_reader.c
index 58a11ff..4804266 100644 (file)
@@ -46,7 +46,7 @@ static void bad_arg( char* what ) {
 static void usage( char* argv0 ) {
        fprintf( stderr, "usage: %s [-d fifo-dir] [-e] [-m msg-type] [-s]\n", argv0 );
        fprintf( stderr, "   -d  dir (default is /tmp/mcl/fifos)\n" );
-       fprintf( stderr, "   -e  extended headers expected in FIFO data\n" );
+       fprintf( stderr, "   -e  disable extended headers expectation in FIFO data\n" );
        fprintf( stderr, "   -m  msg-type (default is 0)\n" );
        fprintf( stderr, "   -s  stats only mode\n" );
 }
@@ -61,7 +61,7 @@ int main( int argc,  char** argv ) {
        int             mtype = 0;
        char    buf[4096];
        int             flush_often = 0;
-       int             long_hdrs = 0;                                  // if -e is on command line, we expect long headers
+       int             long_hdrs = 1;                                  // -e is on command line turns this off, by default we expect long headers
        int             stats_only = 0;
        char    timestamp[MCL_TSTAMP_SIZE];             // we'll get the timestamp from this
        long    count = 0;
@@ -80,7 +80,7 @@ int main( int argc,  char** argv ) {
                                break;
 
                        case 'e':
-                               long_hdrs = 1;
+                               long_hdrs = 0;
                                break;
 
                        case 'f':