first commit of message treatment function (p2p_do_msg)