@ -306,8 +306,9 @@ public class IndexControlRWIs_p
Seed seed = null ;
if ( host . length ( ) ! = 0 ) {
if ( host . length ( ) = = 12 ) {
// the host string is a peer hash
seed = sb . peers . getConnected ( host ) ;
// the host string is !likely! a peer hash (or peer name with 12 chars)
seed = sb . peers . getConnected ( host ) ; // check for seed.hash
if ( seed = = null ) seed = sb . peers . lookupByName ( host ) ; // check for peer name
} else {
// the host string can be a host name
seed = sb . peers . lookupByName ( host ) ;
@ -317,6 +318,7 @@ public class IndexControlRWIs_p
seed = sb . peers . getConnected ( host ) ;
}
if ( seed ! = null ) { // if no seed found skip transfer
// prepare index
ReferenceContainer < WordReference > index ;
final long starttime = System . currentTimeMillis ( ) ;
@ -332,13 +334,13 @@ public class IndexControlRWIs_p
index . size ( ) ) ;
Reference iEntry ;
URIMetadataRow lurl ;
while ( urlIter . hasNext ( ) ) {
while ( urlIter . hasNext ( ) ) {
iEntry = urlIter . next ( ) ;
lurl = segment . urlMetadata ( ) . load ( iEntry . urlhash ( ) ) ;
if ( lurl = = null ) {
if ( lurl = = null ) {
try {
unknownURLEntries . put ( iEntry . urlhash ( ) ) ;
} catch ( final RowSpaceExceededException e ) {
} catch ( final RowSpaceExceededException e ) {
Log . logException ( e ) ;
}
urlIter . remove ( ) ;
@ -355,7 +357,7 @@ public class IndexControlRWIs_p
Word . commonHashLength ) ;
try {
icc . add ( index ) ;
} catch ( final RowSpaceExceededException e ) {
} catch ( final RowSpaceExceededException e ) {
Log . logException ( e ) ;
}
@ -370,6 +372,9 @@ public class IndexControlRWIs_p
+ " seconds, "
+ unknownURLEntries . size ( ) + " URL not found" ) : "error: " + error ) ;
index = null ;
} else {
prop . put ( "result" , "Peer " + host + " not found" ) ;
}
} catch ( final IOException e ) {
Log . logException ( e ) ;
}