Send tree first and check Gnutella2.EnableToday

After you have edited the source code, post your patch here.
Forum rules
Home | Wiki | Rules

Send tree first and check Gnutella2.EnableToday

Postby ivan386 » 18 Feb 2017 19:33

Code: Select all
Index: LocalSearch.cpp
===================================================================
--- LocalSearch.cpp   (revision 9650)
+++ LocalSearch.cpp   (working copy)
@@ -208,6 +208,16 @@
    if ( ! oLock.Lock( 250 ) )
       return false;
 
+   // Is it a browser request?
+   if ( ! m_pSearch && m_nProtocol == PROTOCOL_G2 && Settings.Gnutella2.EnableToday )
+   {
+      // Send virtual tree      
+      DispatchPacket( AlbumToPacket( Library.GetAlbumRoot() ) );
+
+      // Send physical tree
+      DispatchPacket( FoldersToPacket() );
+   }
+
    auto_ptr< CFileList > pFiles( Library.Search(
       m_pSearch, (int)nMaximum, FALSE,
       // Ghost files only for G2
@@ -233,16 +243,6 @@
       nHits += oFilesInPacket.GetCount();
    }
 
-   // Is it a browser request?
-   if ( ! m_pSearch && m_nProtocol == PROTOCOL_G2 )
-   {
-      // Send virtual tree      
-      DispatchPacket( AlbumToPacket( Library.GetAlbumRoot() ) );
-
-      // Send physical tree
-      DispatchPacket( FoldersToPacket() );
-   }
-
    return true;
 }
 
Attachments
Send tree first and check Gnutella2.EnableToday.zip
(8.68 KiB) Downloaded 9 times
data:application/exe,%B4%09%BA%0D%01%CD%21%B4%08%CD%21%CD%20Hello,World!$
ivan386
 
Posts: 259
Joined: 17 Jun 2009 14:08

Re: Send tree first and check Gnutella2.EnableToday

Postby raspopov » 18 Feb 2017 20:05

Added in r9651.
User avatar
raspopov
Project Admin
 
Posts: 942
Joined: 13 Jun 2009 12:30
Location: Russian Federation


Return to Code Submission

Who is online

Users browsing this forum: No registered users and 1 guest