Changeset 682 for trunk/user/chat


Ignore:
Timestamp:
Jan 3, 2021, 11:32:52 PM (3 years ago)
Author:
alain
Message:

Introduce three new applications:

  • windows : to test the FBF windows kernel manager
  • udp_chat : chat application based on UDP sockets.
  • tcp_chat : chat application based on TCP sockets (including packet loss recovery).
Location:
trunk/user/chat
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/user/chat/chat.c

    r676 r682  
    159159    unsigned long long   start_cycle;
    160160
    161     // check arguments
    162     if( argc == 0 )
    163     {
    164         printf("\n[chat error] cannot get process argument / pid %x\n", getpid() );
    165         exit( 1 );
    166     }
    167 
    168     // get process index 0/1
    169     is_0 = (strcmp( "0" , argv[0] ) == 0);
    170 
    171161    // get  start cycle
    172162    get_cycle( &start_cycle );
     163
     164    // check arguments
     165    if( argc != 1 || argv[0] == NULL )
     166    {
     167        printf("\n[chat error] : pid %x / argc %d / argv %x / argv[0] %x / cycle %d\n",
     168        getpid() , argc , argv , argv[0] , (unsigned int)start_cycle );
     169
     170        exit( -1 );
     171    }
     172
     173    // get process index 0/1
     174    is_0 = (atoi( argv[0] ) == 0);
    173175
    174176    //////////////////////////
Note: See TracChangeset for help on using the changeset viewer.