anchor.diff:      i("reset the MGs statistics"),
       rar_reset_mg_stats(MgConf),
       Stats3 = rar_get_mg_stats(MgConf, []),
  -    d("stats for the MGs: ~n~p", [Stats3]),
  +    d("stats for the MGs: "
  +      "~n      ~p", [Stats3]),
   
       i("reset the MGC statistics"),
       rar_reset_mgc_stats(Mgc),
       {ok, MgcStats3} = ?MGC_GET_STATS(Mgc, 1),
  -    d("stats (1) for Mgc: ~n~p~n", [MgcStats3]),
  +    d("stats (1) for Mgc: "
  +      "~n      ~p"
  +      "~n", [MgcStats3]),
   
   
       sleep(1000),
  
positive.code: 
      i("collect the MGs statistics"),
      Stats2 = rar_get_mg_stats(MgConf, []),
      d("stats for MGs: ~n~p", [Stats2]),
  
      i("collect the MGC statistics"),
      {ok, MgcStats2} = ?MGC_GET_STATS(Mgc, 1),
      d("stats (1) for Mgc: ~n~p~n", [MgcStats2]),
  
  
      sleep(1000),
  
negative.code: req_and_cancel(doc) ->
      [];
  req_and_cancel(Config) when is_list(Config) ->
      Pre = fun() ->
                    MgcNode = make_node_name(mgc),
                    MgNode  = make_node_name(mg),
                    d("try start nodes: "
                      "~n      MgcNode: ~p"
                      "~n      MgNode:  ~p", 
                      [MgcNode, MgNode]),
                    Nodes = [MgcNode, MgNode],
                    ok    = ?START_NODES(Nodes),
                    Nodes
            end,
      Case = fun do_req_and_cancel/1,
      Post = fun(Nodes) ->
                     d("stop nodes (in the reverse order):"
                       "~n       ~p", [Nodes]),
                     ?STOP_NODES(lists:reverse(Nodes))
             end,
      try_tc(req_and_cancel, Pre, Case, Post).
  
  do_req_and_cancel([MgcNode, MgNode]) ->
      %% Start the MGC and MGs
      i("start the MGC"),    
      ET = [{text,tcp}, {text,udp}, {binary,tcp}, {binary,udp}],
      {ok, Mgc} = 
  	?MGC_START(MgcNode, {deviceName, "ctrl"}, ET, ?MGC_VERBOSITY),
  
      i("start the MG"),
      {ok, Mg} =
  	?MG_START(MgNode, {deviceName, "mg"}, text, tcp, ?MG_VERBOSITY),
  
      i("connect the MG"),
      Res1 = ?MG_SERV_CHANGE(Mg),
      d("service change result: ~p", [Res1]),
  
  
      sleep(1000),
  
      i("change request action to pending"),
      {ok, _} = ?MGC_REQ_DISC(Mgc,5000),
  
      i("send notify request"),
      ?MG_NOTIF_REQ(Mg),
      
      d("wait some to get it going",[]),
      sleep(1000),
  
      i("now cancel the notify request"),
      ok = ?MG_CANCEL(Mg, req_and_cancel),
  
      i("now await the notify request result"),
      Res2 = ?MG_NOTIF_AR(Mg),
      rac_analyze_result(Res2),
      
  
      %% Tell MGs to stop
      i("stop the MG"),
      ?MG_STOP(Mg),
  
      %% Tell Mgc to stop
      i("stop the MGC"),
      ?MGC_STOP(Mgc),
  
      i("done", []),
      ok.
  
  
  rac_analyze_result({ok, {_PV,Res}}) ->
      i("rac_analyze_result -> notify request result:"
        "~n      ~p", [Res]),
      rac_analyze_result2(Res);
  rac_analyze_result(Unexpected) ->
      e("rac_analyze_result -> unexpected result: "
        "~n      ~p", [Unexpected]),
      exit({unexpected_result, Unexpected}).
  
  rac_analyze_result2({error,{user_cancel, req_and_cancel}}) ->
      ok;
  rac_analyze_result2([]) ->
      ok;
  rac_analyze_result2([{error,{user_cancel, req_and_cancel}}|Res]) ->
      rac_analyze_result2(Res);
  rac_analyze_result2([Unknown|_Res]) ->
      e("rac_analyze_result2 -> unexpected result: "
        "~n      ~p", [Unknown]),
      exit({unknown_result, Unknown}).
      
  