Changeset 6754


Ignore:
Timestamp:
Sep 16, 2008, 4:40:43 PM (13 years ago)
Author:
charles
Message:

(cli 1.3x) backport #1226 (r6655): "Error should print to stderr"

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.3x/cli/cli.c

    r6489 r6754  
    240240    }
    241241    if( peerPort < 1 || peerPort > 65535 ) {
    242         printf( "Error: Port must between 1 and 65535; got %d\n", peerPort );
     242        fprintf( stderr, "Error: Port must between 1 and 65535; got %d\n", peerPort );
    243243        return EXIT_FAILURE;
    244244    }
    245245    if( peerSocketTOS < 0 || peerSocketTOS > 255 ) {
    246         printf( "Error: value must between 0 and 255; got %d\n", peerSocketTOS );
     246        fprintf( stderr, "Error: value must between 0 and 255; got %d\n", peerSocketTOS );
    247247        return EXIT_FAILURE;
    248248    }
     
    369369    if( !tor )
    370370    {
    371         printf( "Failed opening torrent file `%s'\n", torrentPath );
     371        fprintf( stderr, "Failed opening torrent file `%s'\n", torrentPath );
    372372        tr_sessionClose( h );
    373373        return EXIT_FAILURE;
     
    415415        printf( "\r%-*s", LINEWIDTH, line );
    416416        if( st->error )
    417             printf( "\n%s\n", st->errorString );
     417            fprintf( stderr, "\n%s\n", st->errorString );
    418418    }
    419419
Note: See TracChangeset for help on using the changeset viewer.