From 039db26cd2f56840c410380eb2da76219b107b22 Mon Sep 17 00:00:00 2001 From: csoler Date: Thu, 10 Dec 2015 22:25:09 -0500 Subject: [PATCH] improved debug info in rsgxsnetservice.cc --- libretroshare/src/gxs/rsgxsnetservice.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/libretroshare/src/gxs/rsgxsnetservice.cc b/libretroshare/src/gxs/rsgxsnetservice.cc index facc09072..83c327928 100644 --- a/libretroshare/src/gxs/rsgxsnetservice.cc +++ b/libretroshare/src/gxs/rsgxsnetservice.cc @@ -67,9 +67,10 @@ #if defined(NXS_NET_DEBUG_0) || defined(NXS_NET_DEBUG_1) || defined(NXS_NET_DEBUG_2) || defined(NXS_NET_DEBUG_3) || defined(NXS_NET_DEBUG_4) -static const RsPeerId peer_to_print = RsPeerId(std::string("")) ;// use this to limit print to this peer id only -static const RsGxsGroupId group_id_to_print = RsGxsGroupId(std::string("")) ;// use this to allow to this group id only -static const uint32_t service_to_print = 0 ; // use this to allow to this service id only +static const RsPeerId peer_to_print = RsPeerId(std::string("")) ;// use this to limit print to this peer id only, or "" for all IDs +static const RsGxsGroupId group_id_to_print = RsGxsGroupId(std::string("")) ;// use this to allow to this group id only, or "" for all IDs +static const uint32_t service_to_print = 0x0215 ; // use this to allow to this service id only, or 0 for all services + // warning. Numbers should be SERVICE IDS (see serialiser/rsserviceids.h) class nullstream: public std::ostream {}; @@ -79,7 +80,7 @@ static std::ostream& gxsnetdebug(const RsPeerId& peer_id,const RsGxsGroupId& grp if((peer_to_print.isNull() || peer_id.isNull() || peer_id == peer_to_print) && (group_id_to_print.isNull() || grp_id.isNull() || grp_id == group_id_to_print) - && (service_to_print==0 || service_type == 0 || service_type == service_to_print)) + && (service_to_print==0 || service_type == 0 || ((service_type >> 8)&0xffff) == service_to_print)) return std::cerr ; else return null ;