Changes between Version 5 and Version 6 of SplitMsg


Ignore:
Timestamp:
Feb 9, 2007, 3:28:56 PM (17 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • SplitMsg

    v5 v6  
    6868{
    6969        srl_mwmr_t output = GET_ARG(output);
    70         char buf[32] = "!dlrow olleH";
    71 
    72         srl_log_printf(NONE, "Sending \"%s\"\n", buf);
     70        char buf[32] = "...World";
     71        srl_log_printf(NONE, "Producer : Hello...\n");
    7372        srl_mwmr_write(output, buf, 8);
    7473}
     
    8685{
    8786        srl_mwmr_t input = GET_ARG(input);
    88         char buf_in[32];
    89         char buf_out[32];
    90         int i, last_char;
    91 
    92         srl_mwmr_read(input, buf_in, 8);
    93         srl_log_printf(NONE, "Received \"%s\"\n", buf_in);
    94 
    95         for ( last_char=0; buf_in[last_char]; ++last_char )
    96                 ;
    97         for ( i = 0; i<last_char; ++i )
    98                 buf_out[i] = buf_in[last_char-1-i];
    99         buf_out[last_char] = '\0';
    100 
    101         srl_log_printf(NONE, "More readable when \"%s\"\n\n", buf_out);
     87        char buf[32];
     88        srl_mwmr_read(input, buf, 8);
     89        srl_log_printf(NONE, "Consumer : %s\n", buf);
    10290}
    10391}}}