[complement-svn] SF.net SVN: complement: [1747] trunk/complement/explore/lib/janus
Status: Pre-Alpha
Brought to you by:
complement
From: <com...@us...> - 2007-09-27 13:41:21
|
Revision: 1747 http://complement.svn.sourceforge.net/complement/?rev=1747&view=rev Author: complement Date: 2007-09-27 06:41:12 -0700 (Thu, 27 Sep 2007) Log Message: ----------- print trace info before stem's Send Modified Paths: -------------- trunk/complement/explore/lib/janus/ChangeLog trunk/complement/explore/lib/janus/janus.cc trunk/complement/explore/lib/janus/vshostmgr.cc trunk/complement/explore/lib/janus/vtime.cc Modified: trunk/complement/explore/lib/janus/ChangeLog =================================================================== --- trunk/complement/explore/lib/janus/ChangeLog 2007-09-26 10:58:43 UTC (rev 1746) +++ trunk/complement/explore/lib/janus/ChangeLog 2007-09-27 13:41:12 UTC (rev 1747) @@ -1,3 +1,8 @@ +2007-09-27 Petr Ovtchenkov <pt...@is...> + + * vshostmgr.cc, janus.cc, vtime.cc: print trace info before + stem's Send. + 2007-09-25 Petr Ovtchenkov <pt...@is...> * vshostmgr.h, vshostmgr.cc: try to connect to well-known hosts Modified: trunk/complement/explore/lib/janus/janus.cc =================================================================== --- trunk/complement/explore/lib/janus/janus.cc 2007-09-26 10:58:43 UTC (rev 1746) +++ trunk/complement/explore/lib/janus/janus.cc 2007-09-27 13:41:12 UTC (rev 1747) @@ -276,7 +276,6 @@ ev.dest( i->second.stem_addr() ); ev.src( addr ); ev.value().grp = grp; - Forward( ev ); #ifdef __FIT_VS_TRACE try { scoped_lock lk(_lock_tr); @@ -289,6 +288,7 @@ catch ( ... ) { } #endif // __FIT_VS_TRACE + Forward( ev ); } } @@ -341,7 +341,6 @@ ev.dest( addr ); ev.src( i != vtmap.end() ? i->second.stem_addr() : self_id() ); ev.value().grp = grp; - Forward( ev ); #ifdef __FIT_VS_TRACE try { scoped_lock lk(_lock_tr); @@ -354,6 +353,7 @@ catch ( ... ) { } #endif // __FIT_VS_TRACE + Forward( ev ); } ++range.first; } @@ -414,7 +414,6 @@ ev.dest( addr ); ev.src( i != vtmap.end() ? i->second.stem_addr() : self_id() ); ev.value().grp = *grp; - Forward( ev ); #ifdef __FIT_VS_TRACE try { scoped_lock lk(_lock_tr); @@ -427,6 +426,7 @@ catch ( ... ) { } #endif // __FIT_VS_TRACE + Forward( ev ); } ++range.first; } @@ -510,7 +510,6 @@ { if ( ev.value().grp == vshosts_group ) { ev.dest( _hostmgr->self_id() ); - Forward( ev ); #ifdef __FIT_VS_TRACE try { scoped_lock lk(_lock_tr); @@ -523,6 +522,7 @@ catch ( ... ) { } #endif // __FIT_VS_TRACE + Forward( ev ); gaddr_type ga = manager()->reflect( ev.src() ); addr_type janus_addr = badaddr; @@ -536,7 +536,6 @@ stem::Event_base<VSsync_rq> evr( VS_NEW_MEMBER_RV ); evr.dest( janus_addr ); evr.value().grp = vshosts_group; - Send( evr ); #ifdef __FIT_VS_TRACE try { scoped_lock lk(_lock_tr); @@ -549,8 +548,22 @@ catch ( ... ) { } #endif // __FIT_VS_TRACE - + Send( evr ); } +#ifdef __FIT_VS_TRACE + else { + try { + scoped_lock lk(_lock_tr); + if ( _trs != 0 && _trs->good() && (_trflags & tracegroup) ) { + *_trs << "Unexpected VS_NEW_MEMBER on Janus: G" << ev.value().grp << " " + << hex << showbase + << ev.src() << " -> " << ev.dest() << dec << endl; + } + } + catch ( ... ) { + } + } +#endif // __FIT_VS_TRACE } void Janus::VSNewRemoteMemberDirect( const stem::Event_base<VSsync_rq>& ev ) @@ -576,7 +589,6 @@ evs.dest( i->second.stem_addr() ); evs.src( addr ); evs.value().grp = grp; - Forward( evs ); #ifdef __FIT_VS_TRACE try { scoped_lock lk(_lock_tr); @@ -589,11 +601,11 @@ catch ( ... ) { } #endif // __FIT_VS_TRACE + Forward( evs ); stem::Event_base<VSsync_rq> evr( VS_NEW_MEMBER_RV ); evr.dest( janus_addr ); evr.src( i->second.stem_addr() ); evr.value().grp = grp; - Forward( evr ); #ifdef __FIT_VS_TRACE try { scoped_lock lk(_lock_tr); @@ -606,6 +618,7 @@ catch ( ... ) { } #endif // __FIT_VS_TRACE + Forward( evr ); } } @@ -632,7 +645,6 @@ evs.dest( i->second.stem_addr() ); evs.src( addr ); evs.value().grp = grp; - Forward( evs ); #ifdef __FIT_VS_TRACE try { scoped_lock lk(_lock_tr); @@ -645,6 +657,7 @@ catch ( ... ) { } #endif // __FIT_VS_TRACE + Forward( evs ); } } @@ -698,7 +711,6 @@ // send only to local addresses if ( (addr & stem::extbit) == 0 ) { ev.dest( addr ); - Forward( ev ); #ifdef __FIT_VS_TRACE try { scoped_lock lk(_lock_tr); @@ -711,6 +723,7 @@ catch ( ... ) { } #endif // __FIT_VS_TRACE + Forward( ev ); } } ++range.first; Modified: trunk/complement/explore/lib/janus/vshostmgr.cc =================================================================== --- trunk/complement/explore/lib/janus/vshostmgr.cc 2007-09-26 10:58:43 UTC (rev 1746) +++ trunk/complement/explore/lib/janus/vshostmgr.cc 2007-09-27 13:41:12 UTC (rev 1747) @@ -188,7 +188,6 @@ stem::Event_base<VSsync_rq> ev( VS_NEW_MEMBER ); ev.dest( a ); ev.value().grp = vshosts_group; // special group - Send( ev ); #ifdef __FIT_VS_TRACE try { scoped_lock lk(vtdispatcher()->_lock_tr); @@ -202,6 +201,7 @@ catch ( ... ) { } #endif // __FIT_VS_TRACE + Send( ev ); return 0; } #ifdef __FIT_VS_TRACE @@ -263,7 +263,6 @@ if ( ga != *i ) { ev.dest( manager()->reflect( *i ) ); ev.value().grp = grp; - Forward( ev ); #ifdef __FIT_VS_TRACE try { scoped_lock lk(vtdispatcher()->_lock_tr); @@ -276,6 +275,7 @@ catch ( ... ) { } #endif // __FIT_VS_TRACE + Forward( ev ); } } } Modified: trunk/complement/explore/lib/janus/vtime.cc =================================================================== --- trunk/complement/explore/lib/janus/vtime.cc 2007-09-26 10:58:43 UTC (rev 1746) +++ trunk/complement/explore/lib/janus/vtime.cc 2007-09-27 13:41:12 UTC (rev 1747) @@ -671,9 +671,6 @@ out_ev.value().grp = ev.value().grp; get_gvtime( ev.value().grp, out_ev.value().gvt.gvt ); out_ev.value().mess = data; - - Send( out_ev ); - #ifdef __FIT_VS_TRACE try { scoped_lock lk(_vtdsp->_lock_tr); @@ -686,6 +683,7 @@ catch ( ... ) { } #endif // __FIT_VS_TRACE + Send( out_ev ); } void VTHandler::get_gvtime( group_type g, gvtime_type& gvt ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |