From: <z-...@us...> - 2008-01-23 16:21:51
|
Revision: 7606 http://armagetronad.svn.sourceforge.net/armagetronad/?rev=7606&view=rev Author: z-man Date: 2008-01-23 08:20:57 -0800 (Wed, 23 Jan 2008) Log Message: ----------- Ok, .authentication.armagetronad.net ;) Also, removing this default suffix from the authority if it is there. Modified Paths: -------------- armagetronad/branches/0.2.8-auth/armagetronad/src/network/nAuthentification.cpp Modified: armagetronad/branches/0.2.8-auth/armagetronad/src/network/nAuthentification.cpp =================================================================== --- armagetronad/branches/0.2.8-auth/armagetronad/src/network/nAuthentification.cpp 2008-01-23 16:08:21 UTC (rev 7605) +++ armagetronad/branches/0.2.8-auth/armagetronad/src/network/nAuthentification.cpp 2008-01-23 16:20:57 UTC (rev 7606) @@ -519,12 +519,22 @@ authority = out.str().c_str(); + static const char * def = ".authentication.armagetronad.net"; + + // check if the pased authority contains the default ending + if ( dot && authority.Reverse().StartsWith( tString( def ).Reverse() ) ) + { + // strip it + authority = authority.SubStr( 0, authority.Len() - strlen( def ) - 1 ); + dot = false; + } + fullAuthority = authority; // append default authority path if ( authority.Len() > 1 && !dot ) { - fullAuthority += ".armagetronad.net"; + fullAuthority += def; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |